mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-21 20:44:18 +00:00
prima versione test repository
This commit is contained in:
parent
2bba121cae
commit
d9ce27ac63
1 changed files with 19 additions and 0 deletions
19
code/backend/nest_backend/test/test_zrepository.py
Normal file
19
code/backend/nest_backend/test/test_zrepository.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from flask.testing import Client
|
||||
|
||||
'''A file that contains tests of classes and methods for all the requests concerning an user.'''
|
||||
|
||||
|
||||
class TestRepositoryGetAll:
|
||||
def test_get_all_user_repositories(self, flask_client: Client, user_headers):
|
||||
r = flask_client.get(f'/api/v1/repositories/', headers=user_headers)
|
||||
assert r.json["result"] == "success"
|
||||
# assert r.json["data"]["email"] == "admin@admin.com"
|
||||
# assert r.json["data"]["isAdmin"] is True
|
||||
|
||||
def test_get_all_admin_repositories(self, flask_client: Client, admin_headers):
|
||||
r = flask_client.get(f'/api/v1/repositories/', headers=admin_headers)
|
||||
assert r.json["result"] == "success"
|
||||
# assert r.json["data"]["email"] == "admin@admin.com"
|
||||
# assert r.json["data"]["isAdmin"] is True
|
||||
|
||||
|
Loading…
Reference in a new issue