Cura/tests/Settings/conftest.py
Diego Prado Gesto db7f1242cd Fix some unit tests.
Add fixtures to the conftest file and clean-up the code a bit.

Contributes to CURA-5628
2018-08-14 10:41:38 +02:00

19 lines
No EOL
687 B
Python

# Copyright (c) 2018 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
# The purpose of this class is to create fixtures or methods that can be shared among all settings tests.
import pytest
import copy
from UM.Settings.DefinitionContainer import DefinitionContainer #To provide definition containers in the registry fixtures.
# Returns the CuraContainerRegistry instance with some empty containers.
@pytest.fixture()
def container_registry(application):
return application.getContainerRegistry()
# Gives an arbitrary definition container.
@pytest.fixture()
def definition_container():
return DefinitionContainer(container_id = "Test Definition")