aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nullable_fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_nullable_fields.py')
-rw-r--r--tests/test_nullable_fields.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test_nullable_fields.py b/tests/test_nullable_fields.py
index 0c133fc2..8d0c84bb 100644
--- a/tests/test_nullable_fields.py
+++ b/tests/test_nullable_fields.py
@@ -1,10 +1,19 @@
from django.core.urlresolvers import reverse
from django.conf.urls import patterns, url
+from rest_framework import serializers, generics
from rest_framework.test import APITestCase
from tests.models import NullableForeignKeySource
-from tests.serializers import NullableFKSourceSerializer
-from tests.views import NullableFKSourceDetail
+
+
+class NullableFKSourceSerializer(serializers.ModelSerializer):
+ class Meta:
+ model = NullableForeignKeySource
+
+
+class NullableFKSourceDetail(generics.RetrieveUpdateDestroyAPIView):
+ queryset = NullableForeignKeySource.objects.all()
+ serializer_class = NullableFKSourceSerializer
urlpatterns = patterns(