Skip to content

Commit ae86577

Browse files
authored
Update tests for test_raise_error_if_no_suitable_renderers_found
1 parent 00e5065 commit ae86577

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_negotiation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
2-
from django.http import Http404
32
from django.test import TestCase
43

4+
from rest_framework.exceptions import NotAcceptable
55
from rest_framework.negotiation import (
66
BaseContentNegotiation, DefaultContentNegotiation
77
)
@@ -81,7 +81,7 @@ def test_raise_error_if_no_suitable_renderers_found(self):
8181
class MockRenderer:
8282
format = 'xml'
8383
renderers = [MockRenderer()]
84-
with pytest.raises(Http404):
84+
with pytest.raises(NotAcceptable):
8585
self.negotiator.filter_renderers(renderers, format='json')
8686

8787

0 commit comments

Comments
 (0)