aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-26 19:19:13 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-26 19:19:13 +0100
commitff888a7ea215caad5b16ed9f8f65919a7e1a33b0 (patch)
tree2eb9abf11c4e709d36e5a1d852c0547385036688 /ctrack
parent01e62383a91ca5888631a78a16de16beb2aea164 (diff)
some formatting changes - nothing more
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/users/tests/test_functional.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/ctrack/users/tests/test_functional.py b/ctrack/users/tests/test_functional.py
index 2ba5faf..8d459a2 100644
--- a/ctrack/users/tests/test_functional.py
+++ b/ctrack/users/tests/test_functional.py
@@ -16,8 +16,14 @@ from ctrack.users.models import User
pytestmark = pytest.mark.django_db
-def test_user_can_log_in(browser, live_server):
- User.objects.create_user(username="toss", password="knob")
+def test_user_can_log_in(browser, person, live_server):
+
+ # Toss McBride is an OES user. He logs into the system...
+ stakeholder = Stakeholder.objects.create(person=person)
+
+ user = User.objects.create_user(username="toss", password="knob")
+ user.stakeholder = stakeholder
+ user.save()
browser.get(live_server + "/accounts/login")
browser.find_element_by_id("id_login").send_keys("toss")
browser.find_element_by_id("id_password").send_keys("knob")
@@ -26,9 +32,5 @@ def test_user_can_log_in(browser, live_server):
current_url = browser.current_url
assert current_url == live_server + "/users/toss/"
-
-def test_profile_page_html(person, user, browser, live_server):
- stakeholder = Stakeholder.objects.create(person=person)
- user.stakeholder = stakeholder
- user.save()
- browser.get(live_server + f"/users/{user.username}/")
+ # On the other side, he sees some basic details about himself.
+ assert "User: toss" in browser.title