From c0e528b0826877dbd132e533c406dd0d5d09bb6e Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 25 May 2020 17:33:25 +0100 Subject: more useful explanatory comments --- ctrack/users/tests/test_views.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ctrack/users/tests') diff --git a/ctrack/users/tests/test_views.py b/ctrack/users/tests/test_views.py index ca2d0c2..f8e7e78 100644 --- a/ctrack/users/tests/test_views.py +++ b/ctrack/users/tests/test_views.py @@ -67,7 +67,9 @@ def test_profile_view_contains_organisation_information(person): # Django Advanced Testing Topics request.user = user + # We pass 'username' rather than 'slug' here because we are setting 'slug_url_kwarg' in our CBV. response = UserDetailView.as_view()(request, username=user.username) + assert response.status_code == 200 assert response.context_data["user"].username == "testy" assert response.context_data["user"].is_stakeholder() is True -- cgit v1.2.3