diff --git a/onadata/apps/api/tests/viewsets/test_xform_submission_viewset.py b/onadata/apps/api/tests/viewsets/test_xform_submission_viewset.py index e8d49ed0a4..fbe5916012 100644 --- a/onadata/apps/api/tests/viewsets/test_xform_submission_viewset.py +++ b/onadata/apps/api/tests/viewsets/test_xform_submission_viewset.py @@ -1274,7 +1274,7 @@ def test_post_submission_using_project_pk_exceptions(self): auth = DigestAuth("bob", "bobbob") request.META.update(auth(request.META, response)) response = self.view(request, project_pk=f"{self.project.pk}hello") - self.assertEqual(response.status_code, 400) + self.assertContains(response, "Invalid Project id.", status_code=400) self.assertTrue(response.has_header("X-OpenRosa-Version")) self.assertTrue(response.has_header("X-OpenRosa-Accept-Content-Length")) self.assertTrue(response.has_header("Date"))