mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 21:42:14 +00:00
etc
This commit is contained in:
10
conftest.py
10
conftest.py
@@ -24,17 +24,11 @@ def pytest_configure():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def profile(db):
|
||||
profile = Profile(
|
||||
def logged_in_browser(live_server, browser):
|
||||
profile, created = Profile.objects.get_or_create(
|
||||
username="EventTest", first_name="Event", last_name="Test", initials="ETU", is_superuser=True)
|
||||
profile.set_password("EventTestPassword")
|
||||
profile.save()
|
||||
yield profile
|
||||
profile.delete()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def logged_in_browser(live_server, browser, profile):
|
||||
login_page = pages.LoginPage(browser.driver, live_server.url).open()
|
||||
login_page.login("EventTest", "EventTestPassword")
|
||||
return browser
|
||||
|
||||
Reference in New Issue
Block a user