mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
STAR-322: Avoiding lambdas and direct callbacks to avoid gc
This commit is contained in:
parent
2f08854097
commit
e815d5da8f
5 changed files with 59 additions and 24 deletions
|
@ -5,6 +5,7 @@ from unittest import TestCase
|
|||
from unittest.mock import patch, MagicMock
|
||||
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Signal import Signal
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.PrinterOutput.PrinterOutputModel import PrinterOutputModel
|
||||
from src.Cloud.CloudApiClient import CloudApiClient
|
||||
|
@ -26,6 +27,9 @@ class TestCloudOutputDevice(TestCase):
|
|||
def setUp(self):
|
||||
super().setUp()
|
||||
self.app = CuraApplication.getInstance()
|
||||
self.backend = MagicMock(backendStateChange = Signal())
|
||||
self.app.setBackend(self.backend)
|
||||
|
||||
self.network = NetworkManagerMock()
|
||||
self.account = MagicMock(isLoggedIn=True, accessToken="TestAccessToken")
|
||||
self.onError = MagicMock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue