Updte CoreJSON media type

This commit is contained in:
Tom Christie 2016-10-07 12:56:05 +01:00
parent 3eb7fe6f64
commit 5858168d55
2 changed files with 3 additions and 3 deletions

View File

@ -813,7 +813,7 @@ class MultiPartRenderer(BaseRenderer):
class CoreJSONRenderer(BaseRenderer):
media_type = 'application/vnd.coreapi+json'
media_type = 'application/coreapi+json'
charset = None
format = 'corejson'

View File

@ -84,7 +84,7 @@ urlpatterns = [
class TestRouterGeneratedSchema(TestCase):
def test_anonymous_request(self):
client = APIClient()
response = client.get('/', HTTP_ACCEPT='application/vnd.coreapi+json')
response = client.get('/', HTTP_ACCEPT='application/coreapi+json')
self.assertEqual(response.status_code, 200)
expected = coreapi.Document(
url='',
@ -124,7 +124,7 @@ class TestRouterGeneratedSchema(TestCase):
def test_authenticated_request(self):
client = APIClient()
client.force_authenticate(MockUser())
response = client.get('/', HTTP_ACCEPT='application/vnd.coreapi+json')
response = client.get('/', HTTP_ACCEPT='application/coreapi+json')
self.assertEqual(response.status_code, 200)
expected = coreapi.Document(
url='',