mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 21:10:13 +03:00
added missing assert not
This commit is contained in:
parent
88b7a27440
commit
0d3d6d92d9
|
@ -318,7 +318,7 @@ class PKForeignKeyTests(TestCase):
|
|||
data = {'id': 1, 'name': 'source-1', 'target': None}
|
||||
instance = ForeignKeySource.objects.get(pk=1)
|
||||
serializer = ForeignKeySourceSerializer(instance, data=data)
|
||||
assert serializer.is_valid()
|
||||
assert not serializer.is_valid()
|
||||
assert serializer.errors == {'target': ['This field may not be null.']}
|
||||
|
||||
def test_foreign_key_with_unsaved(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user