From c04ce7fce8df24298c1708a044ebfa4afee8a411 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 19 Nov 2018 15:44:07 +0100 Subject: [PATCH] Use call_count on specific method to be more precise --- plugins/UM3NetworkPrinting/tests/TestSendMaterialJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/tests/TestSendMaterialJob.py b/plugins/UM3NetworkPrinting/tests/TestSendMaterialJob.py index 22e96f5ed0..a71ded75b6 100644 --- a/plugins/UM3NetworkPrinting/tests/TestSendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/tests/TestSendMaterialJob.py @@ -97,7 +97,7 @@ class TestSendMaterialJob(TestCase): # We expect the error string to be retrieved and the device not to be called for any follow up. self.assertEqual([call.attribute(0), call.errorString()], reply_mock.method_calls) - self.assertEqual(0, device_mock.call_count) + self.assertEqual(0, device_mock.createFormPart.call_count) @patch("plugins.UM3NetworkPrinting.src.ClusterUM3OutputDevice") @patch("PyQt5.QtNetwork.QNetworkReply") @@ -110,7 +110,7 @@ class TestSendMaterialJob(TestCase): # We expect the reply to be called once to try to get the printers from the list (readAll()). # Given that the parsing there fails we do no expect the device to be called for any follow up. self.assertEqual([call.attribute(0), call.readAll()], reply_mock.method_calls) - self.assertEqual(0, device_mock.call_count) + self.assertEqual(0, device_mock.createFormPart.call_count) # @patch("PyQt5.QtNetwork.QNetworkReply") # def test_sendMissingMaterials_withMissingGuid(self, reply_mock):