mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 05:20:12 +03:00
added missing assert is None
This commit is contained in:
parent
0d3d6d92d9
commit
c705a7dc7c
|
@ -338,7 +338,7 @@ class PKForeignKeyTests(TestCase):
|
||||||
https://github.com/tomchristie/django-rest-framework/issues/1072
|
https://github.com/tomchristie/django-rest-framework/issues/1072
|
||||||
"""
|
"""
|
||||||
serializer = NullableForeignKeySourceSerializer()
|
serializer = NullableForeignKeySourceSerializer()
|
||||||
assert serializer.data['target'] == None
|
assert serializer.data['target'] is None
|
||||||
|
|
||||||
def test_foreign_key_not_required(self):
|
def test_foreign_key_not_required(self):
|
||||||
"""
|
"""
|
||||||
|
@ -461,7 +461,7 @@ class PKNullableForeignKeyTests(TestCase):
|
||||||
source = NullableUUIDForeignKeySource(name='Source')
|
source = NullableUUIDForeignKeySource(name='Source')
|
||||||
serializer = NullableUUIDForeignKeySourceSerializer(source)
|
serializer = NullableUUIDForeignKeySourceSerializer(source)
|
||||||
data = serializer.data
|
data = serializer.data
|
||||||
assert data["target"] == None
|
assert data["target"] is None
|
||||||
|
|
||||||
def test_nullable_uuid_foreign_key_is_valid_when_none(self):
|
def test_nullable_uuid_foreign_key_is_valid_when_none(self):
|
||||||
data = {"name": "Source", "target": None}
|
data = {"name": "Source", "target": None}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user