|
@@ -42,12 +42,33 @@ def fixture2():
|
|
|
|
|
|
def test_login() :
|
|
|
|
|
|
+ s = requests.Session()
|
|
|
+
|
|
|
+ r = s.post("http://127.0.0.1:8000/api/login",json={'username' : 'admin','password': 'aseqzdwxc'})
|
|
|
+ print(r.__dict__)
|
|
|
+ assert r.status_code == 200
|
|
|
+
|
|
|
+ r = s.get("http://127.0.0.1:8000/tab")
|
|
|
+ print(r.__dict__)
|
|
|
+ assert r.status_code == 200
|
|
|
|
|
|
|
|
|
- r = requests.post("http://192.168.1.86:8000/api/login",json={'username' : 'admin','password': 'aseqzdwxc'})
|
|
|
+def test_inventory() :
|
|
|
+ s = requests.Session()
|
|
|
+
|
|
|
+ r = s.post("http://127.0.0.1:8000/api/login",json={'username' : 'admin','password': 'aseqzdwxc'})
|
|
|
print(r.__dict__)
|
|
|
assert r.status_code == 200
|
|
|
|
|
|
+ r = s.get("http://127.0.0.1:8000/tab")
|
|
|
+ print(r.__dict__)
|
|
|
+ assert r.status_code == 200
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|