import sys sys.path.append('/'.join(sys.path[0].split('/')[0:-1])) sys.path.append('/'.join(sys.path[0].split('/')[0:-2])) import a_api import db #making the account x = a_api.make_account({"username": "******", "password": "******"}) #checking the server response if x.status_code != 400: db.reset() raise Exception( f"Account creation w/ no email did not return 400 response, instead returned {x.status_code}" ) db.reset()
import sys sys.path.append('/'.join(sys.path[0].split('/')[0:-1])) sys.path.append('/'.join(sys.path[0].split('/')[0:-2])) import a_api import db #making the account x = a_api.make_account({ "email": "*****@*****.**", "username": "******" }) #checking the server response if x.status_code != 400: db.reset() raise Exception( f"Account creation w/ no password did not return 400 response, instead returned {x.status_code}" ) db.reset()
import sys sys.path.append('/'.join(sys.path[0].split('/')[0:-1])) sys.path.append('/'.join(sys.path[0].split('/')[0:-2])) import a_api import db #making the account x = a_api.make_account({ "email": "*****@*****.**", "username": "******", "password": "******" }) #confirming creation if x.status_code != 201: db.reset() raise Exception( f"Account creation to test login did not return 201 response, instead returned {x.status_code}" ) #testing login user = x.json() y = a_api.login_account({}) if y.status_code != 400: db.reset() raise Exception( f"Login with no payload on valid account did return 400 response, instead returned returned {y.status_code}"
import sys sys.path.append('/'.join(sys.path[0].split('/')[0:-1])) sys.path.append('/'.join(sys.path[0].split('/')[0:-2])) import a_api import db #making the account x = a_api.make_account({}) #checking the server response if x.status_code != 400: db.reset() raise Exception( f"Account creation w/ no username did not return 400 response, instead returned {x.status_code}" ) db.reset()