def login_full_rights(): response = client.post("/login", json=json.dumps({ "username": "******", "password": "******" })) access['token'] = str(response.get_data())[3:-4] return access['token']
def fixture_discipline_post_no_rights(login_no_rights): return client.post("/disciplines", headers={ 'Authorization': 'Bearer {}'.format(login_no_rights) }, json=json.dumps({ "DisciplineName": "Test", "Credits": 4 })).status_code
def _foo(student_id, marks_id): return client.post("/rating", headers={ 'Authorization': 'Bearer {}'.format(login) }, json=json.dumps({ 'StudentID': student_id, 'MarksID': marks_id })).status_code
def login(): print(4) response = client.post("/login", json=json.dumps({ "username": "******", "password": "******" })) access['token'] = str(response.get_data())[3:-4] return access['token']
def fixture_student_post(login): return client.post("/student", headers={ 'Authorization': 'Bearer {}'.format(login) }, json=json.dumps({ "Group": "Test", "FirstName": "Test", "LastName": "Test" })).status_code
def fixture_marks_post_no_rights(login_no_rights): return client.post("/marks", headers={ 'Authorization': 'Bearer {}'.format(login_no_rights) }, json=json.dumps({ "MarksID": 1, "DisciplineID": 1, "Mark": 1, "Passed": False })).status_code
def fixture_login_post(): return client.post("/login", json=json.dumps({ "username": "******", "password": "******" })).status_code