mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 12:17:24 +03:00
26 lines
703 B
Python
26 lines
703 B
Python
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')
|
|
|