mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 20:14:01 +03:00
Update tests for test_raise_error_if_no_suitable_renderers_found
This commit is contained in:
parent
00e5065fa4
commit
ae865773f4
|
@ -1,7 +1,7 @@
|
||||||
import pytest
|
import pytest
|
||||||
from django.http import Http404
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from rest_framework.exceptions import NotAcceptable
|
||||||
from rest_framework.negotiation import (
|
from rest_framework.negotiation import (
|
||||||
BaseContentNegotiation, DefaultContentNegotiation
|
BaseContentNegotiation, DefaultContentNegotiation
|
||||||
)
|
)
|
||||||
|
@ -81,7 +81,7 @@ class TestAcceptedMediaType(TestCase):
|
||||||
class MockRenderer:
|
class MockRenderer:
|
||||||
format = 'xml'
|
format = 'xml'
|
||||||
renderers = [MockRenderer()]
|
renderers = [MockRenderer()]
|
||||||
with pytest.raises(Http404):
|
with pytest.raises(NotAcceptable):
|
||||||
self.negotiator.filter_renderers(renderers, format='json')
|
self.negotiator.filter_renderers(renderers, format='json')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user