diff options
| author | Tom Christie | 2011-05-12 12:55:13 +0100 |
|---|---|---|
| committer | Tom Christie | 2011-05-12 12:55:13 +0100 |
| commit | 15f9e7c56699d31043782045a9fe47c354f612cb (patch) | |
| tree | 2c58441416a877d0afba22d85aea691190a17fa1 /djangorestframework/tests/files.py | |
| parent | 4d126796752cc3c79a24fd9caed49da6c525096f (diff) | |
| download | django-rest-framework-15f9e7c56699d31043782045a9fe47c354f612cb.tar.bz2 | |
refactoring resource specfic stuff into ResourceMixin - validators now defunct
Diffstat (limited to 'djangorestframework/tests/files.py')
| -rw-r--r-- | djangorestframework/tests/files.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/djangorestframework/tests/files.py b/djangorestframework/tests/files.py index f0321cb3..fc82fd83 100644 --- a/djangorestframework/tests/files.py +++ b/djangorestframework/tests/files.py @@ -2,6 +2,7 @@ from django.test import TestCase from django import forms from djangorestframework.compat import RequestFactory from djangorestframework.views import BaseView +from djangorestframework.resource import FormResource import StringIO class UploadFilesTests(TestCase): @@ -15,9 +16,12 @@ class UploadFilesTests(TestCase): class FileForm(forms.Form): file = forms.FileField + class MockResource(FormResource): + form = FileForm + class MockView(BaseView): permissions = () - form = FileForm + resource = MockResource def post(self, request, *args, **kwargs): return {'FILE_NAME': self.CONTENT['file'].name, |
