mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 13:04:19 +00:00
importato unittest
This commit is contained in:
parent
ae6c906395
commit
8128b4622e
1 changed files with 16 additions and 14 deletions
|
@ -1,10 +1,12 @@
|
||||||
|
import unittest
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
auth_code = ""
|
auth_code = ""
|
||||||
|
|
||||||
|
|
||||||
def test_login():
|
class MyTestCase(unittest.TestCase):
|
||||||
|
def test_login(self):
|
||||||
global auth_code
|
global auth_code
|
||||||
r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'})
|
r = requests.post('http://localhost:5000/api/login', json={'email': 'admin@admin.com', 'password': 'amogus'})
|
||||||
j = json.loads(r.text)
|
j = json.loads(r.text)
|
||||||
|
@ -20,4 +22,4 @@ def test_login():
|
||||||
|
|
||||||
|
|
||||||
print("Testing del login")
|
print("Testing del login")
|
||||||
test_login()
|
|
||||||
|
|
Loading…
Reference in a new issue