1
0
mirror of https://github.com/wallabag/docker synced 2025-12-13 09:46:27 +00:00

try to test login

i use requests to test login. the session should be saved and this
should work. but i get a error that th session expired. to run this
start wallabag and run it with pytest: `py.test -s tests/`. it will
output the html of the response.
This commit is contained in:
Marvin Steadfast
2016-08-31 16:38:13 +02:00
parent 4a81bc45db
commit b4b1469215

View File

@@ -12,3 +12,15 @@ def test_login_page():
assert 'Password' in r.text
assert 'Register' in r.text
assert 'Username' in r.text
def test_login():
with requests.Session() as s:
data = {
'_username': 'wallabag',
'_password': 'wallabag'
}
r = s.post(URL + '/login_check', data=data)
print(r.text)