We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f3975f commit cac757eCopy full SHA for cac757e
comiknet_test.py
@@ -0,0 +1,20 @@
1
+from time import sleep
2
+import pytest
3
+import requests
4
+import os
5
+
6
+def test_login():
7
+ username = os.getenv("username")
8
+ password = os.getenv("password")
9
10
+ res = requests.get("http://localhost:8000/login", data={
11
+ "username": username,
12
+ "password": password
13
+ })
14
15
+ assert res.status_code == 200
16
+ print(res.text)
17
18
+if __name__ == "__main__":
19
+ test_login()
20
main.py
@@ -26,7 +26,7 @@
26
27
app.add_middleware(
28
CORSMiddleware,
29
- allow_origins=["http://localhost:5173"],
+ allow_origins=["http://localhost:5173","*"],
30
allow_credentials=True,
31
allow_methods=["*"],
32
allow_headers=["*"],
0 commit comments