mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 21:44:04 +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
|
||||
from django.http import Http404
|
||||
from django.test import TestCase
|
||||
|
||||
from rest_framework.exceptions import NotAcceptable
|
||||
from rest_framework.negotiation import (
|
||||
BaseContentNegotiation, DefaultContentNegotiation
|
||||
)
|
||||
|
@ -81,7 +81,7 @@ class TestAcceptedMediaType(TestCase):
|
|||
class MockRenderer:
|
||||
format = 'xml'
|
||||
renderers = [MockRenderer()]
|
||||
with pytest.raises(Http404):
|
||||
with pytest.raises(NotAcceptable):
|
||||
self.negotiator.filter_renderers(renderers, format='json')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user