diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-26 19:22:24 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-26 19:22:24 +0100 |
commit | 597926cde0980b69280f0064d9a8fac6e5a00da9 (patch) | |
tree | 75dd4d64dc0164a26ba6e3c07b8219582f5889eb /ctrack/users/tests/test_views.py | |
parent | ff888a7ea215caad5b16ed9f8f65919a7e1a33b0 (diff) |
changed name of person more suitable to testing view client
Diffstat (limited to 'ctrack/users/tests/test_views.py')
-rw-r--r-- | ctrack/users/tests/test_views.py | 10 |
1 files changed, 5 insertions, 5 deletions
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" |