From 8edc6a41c160ff75e964db45371e4ae63fb68c17 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 29 May 2020 13:22:56 +0100 Subject: a lot of time and effort looking for a bug with selenium that wasnt there --- ctrack/conftest.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ctrack/conftest.py') diff --git a/ctrack/conftest.py b/ctrack/conftest.py index 37a4a6c..58fabd0 100644 --- a/ctrack/conftest.py +++ b/ctrack/conftest.py @@ -62,9 +62,12 @@ def addr() -> Address: @pytest.fixture -def stakeholder(person): - s = Stakeholder.objects.create(person=person) - return s +def stakeholder_user(person): + user = User.objects.create_user(username="toss", password="knob") + stakeholder = Stakeholder.objects.create(person=person) + user.stakeholder = stakeholder + user.save() + return user @pytest.fixture @@ -72,7 +75,7 @@ def request_factory() -> RequestFactory: return RequestFactory() -@pytest.fixture(scope="module") +@pytest.fixture def browser(request): "Provide selenium webdriver instance." os.environ["PATH"] += os.pathsep + os.getcwd() -- cgit v1.2.3