예제 #1
0
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/")
예제 #3
0
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/")
예제 #4
0
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/")
예제 #5
0
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/")