aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/conftest.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-29 13:22:56 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-29 13:22:56 +0100
commit8edc6a41c160ff75e964db45371e4ae63fb68c17 (patch)
tree6c5d941aa842dc75ae3939d56de1020c13320467 /ctrack/conftest.py
parent2fd651e2cb3a4cd3a31921032af0279d156dd053 (diff)
a lot of time and effort looking for a bug with selenium that wasnt there
Diffstat (limited to '')
-rw-r--r--ctrack/conftest.py11
1 files changed, 7 insertions, 4 deletions
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()