Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_same_schemas_instances_unhashable_modifiers_equal(self, structure):
modifier = [str(i) for i in range(1000)]
assert make_schema_key(
PetSchema(load_only=structure(modifier))
) == make_schema_key(PetSchema(load_only=structure(modifier[::-1])))
def test_raise_if_schema_class_passed(self):
with pytest.raises(TypeError, match="based on a Schema instance"):
make_schema_key(PetSchema)
def test_instances_with_different_modifiers_not_equal(self):
assert make_schema_key(PetSchema()) != make_schema_key(PetSchema(partial=True))
def test_different_schemas_not_equal(self):
assert make_schema_key(PetSchema()) != make_schema_key(SampleSchema())
def test_same_schemas_instances_equal(self):
assert make_schema_key(PetSchema()) == make_schema_key(PetSchema())