Fixed one of the tests

The test failed due to it not creating the right application CURA-3497
This commit is contained in:
Jaime van Kessel 2017-05-01 16:10:05 +02:00
parent 8a227c0269
commit e6e442348b

View file

@ -11,6 +11,8 @@ from UM.Settings.InstanceContainer import InstanceContainer #To check against th
import cura.Settings.ExtruderStack #The module we're testing. import cura.Settings.ExtruderStack #The module we're testing.
from cura.Settings.Exceptions import InvalidContainerError, InvalidOperationError #To check whether the correct exceptions are raised. from cura.Settings.Exceptions import InvalidContainerError, InvalidOperationError #To check whether the correct exceptions are raised.
from cura.CuraApplication import CuraApplication
## Fake container registry that always provides all containers you ask of. ## Fake container registry that always provides all containers you ask of.
@pytest.yield_fixture() @pytest.yield_fixture()
def container_registry(): def container_registry():
@ -239,6 +241,7 @@ def test_deserializeMoveDefinitionContainer(extruder_stack):
## Tests whether getProperty properly applies the stack-like behaviour on its ## Tests whether getProperty properly applies the stack-like behaviour on its
# containers. # containers.
def test_getPropertyFallThrough(extruder_stack): def test_getPropertyFallThrough(extruder_stack):
CuraApplication.getInstance() # To ensure that we have the right Application
#A few instance container mocks to put in the stack. #A few instance container mocks to put in the stack.
mock_layer_heights = {} #For each container type, a mock container that defines layer height to something unique. mock_layer_heights = {} #For each container type, a mock container that defines layer height to something unique.
mock_no_settings = {} #For each container type, a mock container that has no settings at all. mock_no_settings = {} #For each container type, a mock container that has no settings at all.