Browse Source

Pushing tests and updating the pipfile.lock

merge-requests/1/head
Drew Short 7 years ago
parent
commit
334efca0b5
  1. 6
      server/Pipfile.lock
  2. 22
      server/tests/api/test_authentication_api.py

6
server/Pipfile.lock

@ -241,11 +241,11 @@
},
"pytest": {
"hashes": [
"sha256:8ea01fc4fcc8e1b1e305252b4bc80a1528019ab99fd3b88666c9dc38d754406c",
"sha256:90898786b3d0b880b47645bae7b51aa9bbf1e9d1e4510c2cfd15dd65c70ea0cd"
"sha256:0453c8676c2bee6feb0434748b068d5510273a916295fd61d306c4f22fbfd752",
"sha256:4b208614ae6d98195430ad6bde03641c78553acee7c83cec2e85d613c0cd383d"
],
"index": "pypi",
"version": "==3.6.2"
"version": "==3.6.3"
},
"python-dotenv": {
"hashes": [

22
server/tests/api/test_authentication_api.py

@ -0,0 +1,22 @@
from tests.conftest import AuthActions
def test_login_happy_path(auth: AuthActions):
result = auth.login()
assert result.status_code == 200
assert result.json['token'] is not None and len(result.json['token']) > 0
def test_bump_happy_path(auth: AuthActions):
auth.login()
result = auth.bump()
assert result.status_code == 200
assert result.json['last_login_time'] is not None \
and len(result.json['last_login_time']) > 0
def test_logout_happy_path(auth: AuthActions):
auth.login()
result = auth.logout()
assert result.status_code == 200
assert result.json is None
Loading…
Cancel
Save