diff options
| author | Marko Tibold | 2012-10-28 19:35:50 +0100 |
|---|---|---|
| committer | Marko Tibold | 2012-10-28 19:35:50 +0100 |
| commit | bc99142c7dc1ebf84ca0858ce32b400a537e1908 (patch) | |
| tree | ce90458be1f2cee9295385953d585c1175449e02 /rest_framework/tests/models.py | |
| parent | 1eb56ebdd922907fd6c0598f1cae659b8f8a4e42 (diff) | |
| download | django-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.py | 5 |
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) |
