def test_post_not_exists(self): presenter = Presenter() from django_swagger_utils.drf_server.exceptions import BadRequest with pytest.raises(BadRequest): response = presenter.post_not_exists()