Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert len(catalogue.REGISTRY) == 1
assert ("a", "b", "c") in catalogue.REGISTRY
assert catalogue.check_exists("a", "b", "c")
assert catalogue.REGISTRY[("a", "b", "c")] == "test"
assert catalogue._get(("a", "b", "c")) == "test"
with pytest.raises(catalogue.RegistryError):
catalogue._get(("a", "b", "d"))
with pytest.raises(catalogue.RegistryError):
catalogue._get(("a", "b", "c", "d"))
catalogue._set(("x", "y", "z1"), "test1")
catalogue._set(("x", "y", "z2"), "test2")
assert catalogue._remove(("a", "b", "c")) == "test"
catalogue._set(("x", "y2"), "test3")
with pytest.raises(catalogue.RegistryError):
catalogue._remove(("x", "y"))
assert catalogue._remove(("x", "y", "z2")) == "test2"