diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-24 20:51:33 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-24 20:51:33 +0100 |
commit | 708b983c9cb0895ae0d205013d46a17020c4ef73 (patch) | |
tree | 3583151f0dc95b1be2462207d20dbee0a53fd866 /ctrack/users/tests/test_views.py | |
parent | 7494bebcd8c531df0680e96952ffeceb34fd0a57 (diff) |
removed oes field from user - about to make a profile model
Diffstat (limited to '')
-rw-r--r-- | ctrack/users/tests/test_views.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ctrack/users/tests/test_views.py b/ctrack/users/tests/test_views.py index 8b923f6..561c540 100644 --- a/ctrack/users/tests/test_views.py +++ b/ctrack/users/tests/test_views.py @@ -53,13 +53,8 @@ def test_profile_view_contains_organisation_information(): 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. """ - org = OrganisationFactory.create() user = get_user_model().objects.create_user( - username="testy", - email="testy@test.com", - password="test1020", - oes_user=True, - organisation=org, + username="testy", email="testy@test.com", password="test1020" ) factory = RequestFactory() request = factory.get(f"/users/{user.username}") @@ -68,6 +63,5 @@ def test_profile_view_contains_organisation_information(): request.user = user response = UserDetailView.as_view()(request, username=user.username) assert response.status_code == 200 - assert response.context_data["object"].oes_user is True # TODO - work out how we can attach an organisation to the User model - assert response.context_data["object"].organisation.name == org.name + assert response.context_data["object"] |