aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/generics.py
diff options
context:
space:
mode:
authorNikolaus Schlemm2013-05-19 09:25:02 +0200
committerNikolaus Schlemm2013-05-19 09:25:02 +0200
commitc0f3a1c397a564ee78b3a656f14f7ff46b0d2b31 (patch)
treeb33a515f024a93051424318b2c6d1a291fee5198 /rest_framework/tests/generics.py
parent9454e23aa927931dcb7a6921c6ad238f6369e64e (diff)
downloaddjango-rest-framework-c0f3a1c397a564ee78b3a656f14f7ff46b0d2b31.tar.bz2
Integrated status quo of grimborg's awesome humanize_field() for exposing field metadata via OPTIONS :)
Diffstat (limited to 'rest_framework/tests/generics.py')
-rw-r--r--rest_framework/tests/generics.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/rest_framework/tests/generics.py b/rest_framework/tests/generics.py
index d8556638..a1edd28d 100644
--- a/rest_framework/tests/generics.py
+++ b/rest_framework/tests/generics.py
@@ -128,18 +128,18 @@ class TestRootView(TestCase):
for method in ('GET', 'POST',):
expected['actions'][method] = {
'text': {
- 'description': '',
- 'label': '',
- 'readonly': False,
+ #'description': '',
+ 'label': None,
+ 'read_only': False,
'required': True,
- 'type': 'CharField',
+ 'type': 'Single Character',
},
'id': {
- 'description': '',
- 'label': '',
- 'readonly': True,
- 'required': True,
- 'type': 'IntegerField',
+ #'description': '',
+ 'label': None,
+ 'read_only': True,
+ 'required': False,
+ 'type': 'Integer',
},
}
self.assertEqual(response.status_code, status.HTTP_200_OK)
@@ -264,18 +264,18 @@ class TestInstanceView(TestCase):
for method in ('GET', 'PATCH', 'PUT', 'DELETE'):
expected['actions'][method] = {
'text': {
- 'description': '',
- 'label': '',
- 'readonly': False,
+ #'description': '',
+ 'label': None,
+ 'read_only': False,
'required': True,
- 'type': 'CharField',
+ 'type': 'Single Character',
},
'id': {
- 'description': '',
- 'label': '',
- 'readonly': True,
- 'required': True,
- 'type': 'IntegerField',
+ #'description': '',
+ 'label': None,
+ 'read_only': True,
+ 'required': False,
+ 'type': 'Integer',
},
}
self.assertEqual(response.status_code, status.HTTP_200_OK)