mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 01:26:53 +03:00
fix wrong assert
This commit is contained in:
parent
63d8dc0b9b
commit
d2ae41529c
|
@ -178,7 +178,7 @@ class SlugForeignKeyTests(TestCase):
|
||||||
data = {'id': 1, 'name': 'source-1', 'target': None}
|
data = {'id': 1, 'name': 'source-1', 'target': None}
|
||||||
instance = ForeignKeySource.objects.get(pk=1)
|
instance = ForeignKeySource.objects.get(pk=1)
|
||||||
serializer = ForeignKeySourceSerializer(instance, data=data)
|
serializer = ForeignKeySourceSerializer(instance, data=data)
|
||||||
assert serializer.is_valid()
|
assert not serializer.is_valid()
|
||||||
assert serializer.errors == {'target': ['This field may not be null.']}
|
assert serializer.errors == {'target': ['This field may not be null.']}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user