def tests_Client_list_view(): instance1 = test_helpers.create_Auth_Client() instance2 = test_helpers.create_Auth_Client() client = Client() url = reverse("Auth_Client_list") response = client.get(url) assert response.status_code == 200 assert str(instance1) in response.content.decode("utf-8") assert str(instance2) in response.content.decode("utf-8")
def tests_Client_detail_view(): client = Client() instance = test_helpers.create_Auth_Client() url = reverse("Auth_Client_detail", args=[instance.pk, ]) response = client.get(url) assert response.status_code == 200 assert str(instance) in response.content.decode("utf-8")
def tests_Company_create_view(): client = test_helpers.create_Auth_Client() client = Client() url = reverse("Auth_Company_create") data = { "client": client.pk, } response = client.post(url, data) assert response.status_code == 302
def tests_Client_update_view(): role = test_helpers.create_Auth_Role() client = Client() instance = test_helpers.create_Auth_Client() url = reverse("Auth_Client_update", args=[instance.pk, ]) data = { "role": role.pk, } response = client.post(url, data) assert response.status_code == 302
def tests_Student_create_view(): client = test_helpers.create_Auth_Client() client = Client() url = reverse("Auth_Student_create") data = { "Phone": "text", "client": client.pk, } response = client.post(url, data) assert response.status_code == 302