Beispiel #1
0
 class Schema:
     email = StringField(
         regex="[^@]+@[^@]+\.[^@]+",
         pk=True,
         description="Addess to which the notifications shall be sent")
     first_name = StringField(description="Given name(s)")
     last_name = StringField(description="Family name(s)")
Beispiel #2
0
 class Schema:
     pk = StringField(pk=True, description="Identifier of the resource")
     value = IntegerField(min_val=0,
                          max_val=100,
                          description="Lecturer's performance identifier ")
     creation_time = DateTimeField(
         description="Time when the rating was added (for sorting purpose)")
Beispiel #3
0
 class Schema:
     pk = StringField(pk=True, description="Identifier of the resource")
     value = StringField(description="Text of the comment")
     creation_time = DateTimeField(description="Time when the comment was added (for sorting purpose)")
Beispiel #4
0
 class Schema:
     name = StringField(pk=True, description="Name of the course. E.g. physics, maths.")
     duration = IntegerField(description="Length of the course in weeks")
Beispiel #5
0
 class Schema(Person.Schema):
     category = StringField(description="TQS Category",
                            choices=["four", "five", "five plus", "six"])
Beispiel #6
0
 class Sample(Schema):
     one = IntegerField()
     two = StringField()
     three = DateTimeField()
     has_additional_fields = True
Beispiel #7
0
 class Schema:
     email = StringField(regex="[^@]+@[^@]+\.[^@]+", pk=True,
                         description="Addess to which the notifications shall be sent")
     first_name = StringField(description="Given name(s)")
     last_name = StringField(description="Family name(s)")
     category = StringField(description="TQS Category", choices=["four", "five", "five plus", "six"])
Beispiel #8
0
 class SchemaWithoutErrors(Schema):
     one = IntegerField()
     two = StringField()
Beispiel #9
0
 class Sample(Schema):
     one = IntegerField()
     two = StringField()
     three = DateTimeField()
Beispiel #10
0
        class TempSchema(Schema):
            required_field = StringField(required=False)
            foo = 123

            def bar(self):
                pass
Beispiel #11
0
 class TempSchema(Schema):
     required_field = StringField(required=True)
Beispiel #12
0
 class TempSchema(Schema):
     item_field = StringField(required=False)
Beispiel #13
0
 class TempSchema(Schema):
     default_required_field = StringField(required=True, default="BLA")
Beispiel #14
0
 def test_with_field_object(self):
     field = ListField(StringField())
     field.deserialize(["WUGA"])