def setup_user_test(selenium, live_server): Company.objects.create(name="Mindhash", email="*****@*****.**") Company.objects.create(name="Test", email="*****@*****.**") authenticate_selenium(selenium, live_server, is_admin=True, first_name="admin") selenium.maximize_window() selenium.get(live_server.url + "/admin/users/add")
def device_setup(selenium, live_server): Company.objects.create(name="Test", email="*****@*****.**") Company.objects.create(name="Test_2", email="*****@*****.**") DoorDevice.objects.create() DoorDevice.objects.create() authenticate_selenium(selenium, live_server, is_admin=True) selenium.maximize_window() selenium.get(live_server.url + "/admin/door_devices/")
def user_setup(selenium, live_server): Company.objects.create(name="Mindhash", email="*****@*****.**") Company.objects.create(name="Test", email="*****@*****.**") User.objects.create(first_name="John", last_name="Doe", email="*****@*****.**", is_admin=False) User.objects.create(first_name="Jan", last_name="Janssen", email="*****@*****.**", is_admin=True) authenticate_selenium(selenium, live_server, is_admin=True, first_name="admin") selenium.maximize_window() selenium.get(live_server.url + "/admin/users/")
def setup_test(selenium, live_server): company = CompanyFactory(name="Mindhash", email="*****@*****.**") authenticate_selenium(selenium, live_server, company=company) selenium.maximize_window() selenium.get(live_server.url + "/company/")
def setup_company(selenium, live_server): Company.objects.create(name="Test", email="*****@*****.**") Company.objects.create(name="Test_2", email="*****@*****.**") authenticate_selenium(selenium, live_server, is_admin=True) selenium.maximize_window() selenium.get(live_server.url + "/admin/companies/")