mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Try other patch values for relative imports
This commit is contained in:
parent
d9a8bb0eb7
commit
aab1fbc73f
4 changed files with 6 additions and 9 deletions
|
@ -28,10 +28,8 @@ class TestCloudOutputDeviceManager(TestCase):
|
|||
|
||||
self.network = NetworkManagerMock()
|
||||
self.timer = MagicMock(timeout = FakeSignal())
|
||||
with patch("plugins.UM3NetworkPrinting.src.Cloud.CloudApiClient.QNetworkAccessManager",
|
||||
return_value = self.network), \
|
||||
patch("plugins.UM3NetworkPrinting.src.Cloud.CloudOutputDeviceManager.QTimer",
|
||||
return_value = self.timer):
|
||||
with patch("CloudApiClient.QNetworkAccessManager", return_value = self.network), \
|
||||
patch("CloudOutputDeviceManager.QTimer", return_value = self.timer):
|
||||
self.manager = CloudOutputDeviceManager()
|
||||
self.clusters_response = parseFixture("getClusters")
|
||||
self.network.prepareReply("GET", self.URL, 200, readFixture("getClusters"))
|
||||
|
@ -114,7 +112,7 @@ class TestCloudOutputDeviceManager(TestCase):
|
|||
|
||||
active_machine_mock.setMetaDataEntry.assert_called_with("um_cloud_cluster_id", cluster2["cluster_id"])
|
||||
|
||||
@patch("plugins.UM3NetworkPrinting.src.Cloud.CloudOutputDeviceManager.Message")
|
||||
@patch("CloudOutputDeviceManager.Message")
|
||||
def test_api_error(self, message_mock):
|
||||
self.clusters_response = {
|
||||
"errors": [{"id": "notFound", "title": "Not found!", "http_status": "404", "code": "notFound"}]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue