@@ -0,0 +1,1141 @@
+# Copyright (c) 2016 Ultimaker B.V.%0A# Uranium is released under the terms of the AGPLv3 or higher.%0A%0Aimport pytest%0Aimport os.path%0A%0Aimport UM.Settings%0A%0Afrom UM.Resources import Resources%0Afrom UM.MimeTypeDatabase import MimeType, MimeTypeDatabase%0A%0A@pytest.fixture%0Adef container_registry():%0A    Resources.addSearchPath(os.path.dirname(os.path.abspath(__file__)))%0A    UM.Settings.ContainerRegistry._ContainerRegistry__instance = None # Reset the private instance variable every time%0A    return UM.Settings.ContainerRegistry.getInstance()%0A%0Adef test_load(container_registry):%0A    container_registry.load()%0A%0A    definitions = container_registry.findDefinitionContainers(%7B %22id%22: %22single_setting%22 %7D)%0A    assert len(definitions) == 1%0A%0A    definition = definitions%5B0%5D%0A    assert definition.getId() == %22single_setting%22%0A%0A    definitions = container_registry.findDefinitionContainers(%7B %22author%22: %22Ultimaker%22 %7D)%0A    assert len(definitions) == 3%0A%0A    ids_found = %5B%5D%0A    for definition in definitions:%0A        ids_found.append(definition.getId())%0A%0A    assert %22metadata%22 in ids_found%0A    assert %22single_setting%22 in ids_found%0A    assert %22inherits%22 in ids_found%0A

Add a test for ContainerRegistry