Skip to content

Commit

Permalink
add BinaryField case to tests #506
Browse files Browse the repository at this point in the history
  • Loading branch information
tfranzel committed Sep 8, 2021
1 parent 22a82a1 commit 66cc94b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class AllFields(models.Model):
field_nullbool = models.NullBooleanField() # type: ignore
field_time = models.TimeField()
field_duration = models.DurationField()
field_binary = models.BinaryField()

# relations
field_foreign = models.ForeignKey(
Expand Down Expand Up @@ -290,6 +291,7 @@ def test_model_setup_is_valid():
field_nullbool=None,
field_time='00:05:23.283',
field_duration=timedelta(seconds=10),
field_binary=b'\xce\x9c\xce\xb9\xce\xb1',
# relations
field_foreign=aux,
field_o2o=aux,
Expand Down
5 changes: 5 additions & 0 deletions tests/test_fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ components:
format: time
field_duration:
type: string
field_binary:
type: string
format: byte
readOnly: true
field_foreign:
type: string
format: uuid
Expand All @@ -278,6 +282,7 @@ components:
description: set of related aux objects
required:
- field_bigint
- field_binary
- field_bool
- field_bool_override
- field_char
Expand Down

0 comments on commit 66cc94b

Please sign in to comment.