From 597926cde0980b69280f0064d9a8fac6e5a00da9 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 26 May 2020 19:22:24 +0100 Subject: changed name of person more suitable to testing view client --- ctrack/users/tests/test_views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ctrack/users/tests/test_views.py') diff --git a/ctrack/users/tests/test_views.py b/ctrack/users/tests/test_views.py index 0f57b36..e3aed6c 100644 --- a/ctrack/users/tests/test_views.py +++ b/ctrack/users/tests/test_views.py @@ -49,9 +49,9 @@ class TestUserRedirectView: def test_profile_view_contains_organisation_information(person, user): - """url: users/username - This is where users are redirected to when they log in and where I want to capture - information about the user - particularly if they are an OES user. + """ + This tests the context_data - not the rendered page... We'll do that in the + next test. """ org_name = person.organisation.name stakeholder = Stakeholder.objects.create(person=person) @@ -70,7 +70,7 @@ def test_profile_view_contains_organisation_information(person, user): assert response.status_code == 200 assert response.context_data["user"].username == user.username assert response.context_data["user"].is_stakeholder() is True - assert response.context_data["user"].stakeholder.person.first_name == "Chinaplate" + assert response.context_data["user"].stakeholder.person.first_name == "Toss" # Two ways of getting the organisaton name assert ( @@ -78,4 +78,4 @@ def test_profile_view_contains_organisation_information(person, user): == org_name ) assert response.context_data["user"].get_organisation_name() == org_name - assert response.context_data["user"].stakeholder.person.first_name == "Chinaplate" + assert response.context_data["user"].stakeholder.person.first_name == "Toss" -- cgit v1.2.3