How to use the apispec.ext.marshmallow.common.make_schema_key function in apispec

To help you get started, we’ve selected a few apispec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marshmallow-code / apispec / tests / test_ext_marshmallow_common.py View on Github external
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])))
github marshmallow-code / apispec / tests / test_ext_marshmallow_common.py View on Github external
def test_raise_if_schema_class_passed(self):
        with pytest.raises(TypeError, match="based on a Schema instance"):
            make_schema_key(PetSchema)
github marshmallow-code / apispec / tests / test_ext_marshmallow_common.py View on Github external
def test_instances_with_different_modifiers_not_equal(self):
        assert make_schema_key(PetSchema()) != make_schema_key(PetSchema(partial=True))
github marshmallow-code / apispec / tests / test_ext_marshmallow_common.py View on Github external
def test_different_schemas_not_equal(self):
        assert make_schema_key(PetSchema()) != make_schema_key(SampleSchema())
github marshmallow-code / apispec / tests / test_ext_marshmallow_common.py View on Github external
def test_same_schemas_instances_equal(self):
        assert make_schema_key(PetSchema()) == make_schema_key(PetSchema())