Пример #1
0
class GroupSchema(Schema):

    type = custom_fields.ClassName()
    passed = fields.Boolean()
    meta_type = fields.String()
    description = custom_fields.Unicode(allow_none=True)
    entries = GenericEntryList(allow_none=True)
Пример #2
0
class ExceptionRaisedSchema(AssertionSchema):

    raised_exception = custom_fields.ExceptionField()
    expected_exceptions = fields.List(custom_fields.NativeOrPretty())

    pattern = custom_fields.Unicode(allow_none=True)
    func = fields.String(allow_none=True)

    exception_match = fields.Boolean()
    func_match = fields.Boolean()
    pattern_match = fields.Boolean()
Пример #3
0
class BaseSchema(Schema):
    utc_time = fields.LocalDateTime()
    machine_time = custom_fields.UTCDateTime()
    type = custom_fields.ClassName()
    meta_type = fields.String()
    description = custom_fields.Unicode()
    line_no = fields.Integer()
    category = fields.String()

    def load(self, *args, **kwargs):
        raise NotImplementedError("Only serialization is supported.")