From fcd7f414c407c8dab7c0badbfa16476826dad3ae Mon Sep 17 00:00:00 2001 From: tom christie tom@tomchristie.com Date: Fri, 4 Feb 2011 21:52:21 +0000 Subject: Huge stack of refactoring getting stuff into Mixin classes, and loads of tests. Kickass. --- djangorestframework/tests/response.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 djangorestframework/tests/response.py (limited to 'djangorestframework/tests/response.py') diff --git a/djangorestframework/tests/response.py b/djangorestframework/tests/response.py new file mode 100644 index 00000000..c199f300 --- /dev/null +++ b/djangorestframework/tests/response.py @@ -0,0 +1,25 @@ +from django.test import TestCase +from djangorestframework.response import Response + +try: + import unittest2 +except: + unittest2 = None +else: + import warnings + warnings.filterwarnings("ignore") + +if unittest2: + class TestResponse(TestCase, unittest2.TestCase): + + # Interface tests + + # This is mainly to remind myself that the Response interface needs to change slightly + @unittest2.expectedFailure + def test_response_interface(self): + """Ensure the Response interface is as expected.""" + response = Response() + getattr(response, 'status') + getattr(response, 'content') + getattr(response, 'headers') + -- cgit v1.2.3