STAR-322: Using a test setup to run tests with Cura app

This commit is contained in:
Daniel Schiavini 2018-12-10 13:11:42 +01:00
parent 134f97d5f1
commit f432d7c858
5 changed files with 58 additions and 17 deletions

View file

@ -95,9 +95,8 @@ class TestCloudApiClient(TestCase):
def _callback(clusters):
result.extend(clusters)
with mock.patch.object(Application, "getInstance", new = lambda: FixtureApplication()):
api = CloudApiClient(account_mock, self._errorHandler)
api.getClusters(_callback)
api = CloudApiClient(account_mock, self._errorHandler)
api.getClusters(_callback)
manager_mock.return_value.finished.emit(reply_mock)