def test_configuration_subclass_inherits_items(self):
        class BaseConfig(schema.Schema):
            base = schema.BooleanItem(default=True, required=True)

        class SubClassedConfig(BaseConfig):
            hungry = schema.BooleanItem(
                title="Hungry", description="Are you hungry?", required=True
            )

        self.assertDictEqual(
            SubClassedConfig.serialize(),
            {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "type": "object",
                "properties": {
                    "base": {"default": True, "type": "boolean", "title": "base"},
                    "hungry": {
                        "type": "boolean",
                        "description": "Are you hungry?",
                        "title": "Hungry",
                    },
                },
                "required": ["base", "hungry"],
                "x-ordering": ["base", "hungry"],
                "additionalProperties": False,
            },
        )

        class MergedConfigClass(schema.Schema):
            thirsty = schema.BooleanItem(
                title="Thirsty", description="Are you thirsty?", required=True
            )
            merge_subclassed = SubClassedConfig(flatten=True)

        expected = {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "properties": {
                "thirsty": {
                    "type": "boolean",
                    "description": "Are you thirsty?",
                    "title": "Thirsty",
                },
                "base": {"default": True, "type": "boolean", "title": "base"},
                "hungry": {
                    "type": "boolean",
                    "description": "Are you hungry?",
                    "title": "Hungry",
                },
            },
            "required": ["thirsty", "base", "hungry"],
            "x-ordering": ["thirsty", "base", "hungry"],
            "additionalProperties": False,
        }
        self.assertDictContainsSubset(
            MergedConfigClass.serialize()["properties"], expected["properties"]
        )
        self.assertDictContainsSubset(expected, MergedConfigClass.serialize())