Add user login and replace pipenv with Nix

This commit is contained in:
2020-05-28 00:53:23 +02:00
parent 66092ba6e3
commit 75843f4927
7 changed files with 84 additions and 457 deletions

View File

@@ -9,15 +9,27 @@ def test_registration(client):
user = {
"full_name": "Bilal Balaperdida",
"email": "oyvey@hotmail.com",
"password": generate_password_hash(password="lifeisabitch", method="md5"),
"password": "lifeisabitch",
"gender": 3,
"mobile": "+212655778899",
"city_id": 12,
"user_type": 1,
"lang_type": 1,
"device_id": token_hex(8),
"device_id": token_hex(16),
"device_type": 1,
"badge": 0,
}
response = client.post("/register", json=user)
assert response.status == "200 OK"
def test_login(client):
user = {
"email": "12@gmail.com",
"password": "odyfo2020",
"device_id": "fEll6hxazGQ:APA91bFpsB44ZHgjUItYOKTTmUxxkJsWiuaeojdxiTLVbz-AwN90XwLvpA6nRQoLrUYaF-HoHTz4Vc5S0VlqemerJ6MjG4zqwfNYB75whQVQI1M29yhMc3oFdl1me2zP_RY2dXbfx7UW",
"lang_type": 2,
"user_type": 1,
}
response = client.post("/login", json=user)
assert response.status == "200 OK"