Skip to content

Commit 3e79702

Browse files
committed
PreRev 4.3.9 - 0227 测试组件更新
1 parent cac757e commit 3e79702

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

comiknet_test.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
from time import sleep
21
import pytest
32
import requests
3+
import json
44
import os
55

66
def test_login():
77
username = os.getenv("username")
88
password = os.getenv("password")
99

10-
res = requests.get("http://localhost:8000/login", data={
11-
"username": username,
12-
"password": password
13-
})
14-
10+
res = requests.post("http://localhost:8000/login", data=json.dumps({
11+
"username": username if username else "admin",
12+
"password": password if password else "admin"
13+
}))
14+
1515
assert res.status_code == 200
16-
print(res.text)
1716

1817
if __name__ == "__main__":
1918
test_login()

0 commit comments

Comments
 (0)