aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/models.py
diff options
context:
space:
mode:
authorMarko Tibold2012-10-28 19:35:50 +0100
committerMarko Tibold2012-10-28 19:35:50 +0100
commitbc99142c7dc1ebf84ca0858ce32b400a537e1908 (patch)
treece90458be1f2cee9295385953d585c1175449e02 /rest_framework/tests/models.py
parent1eb56ebdd922907fd6c0598f1cae659b8f8a4e42 (diff)
downloaddjango-rest-framework-bc99142c7dc1ebf84ca0858ce32b400a537e1908.tar.bz2
Added wo tests. One for PUTing on a non-existing id-based url. And another for PUTing on a non-existing slug-based url.
Fix doctoring for 'test_put_cannot_set_id'.
Diffstat (limited to 'rest_framework/tests/models.py')
-rw-r--r--rest_framework/tests/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/rest_framework/tests/models.py b/rest_framework/tests/models.py
index d4ea729b..ac73a4bb 100644
--- a/rest_framework/tests/models.py
+++ b/rest_framework/tests/models.py
@@ -52,6 +52,11 @@ class BasicModel(RESTFrameworkModel):
text = models.CharField(max_length=100)
+class SlugBasedModel(RESTFrameworkModel):
+ text = models.CharField(max_length=100)
+ slug = models.SlugField(max_length=32)
+
+
class DefaultValueModel(RESTFrameworkModel):
text = models.CharField(default='foobar', max_length=100)