store cookies in xdg-data-dir, clean up typing, fix some tests
This commit is contained in:
@@ -9,9 +9,8 @@ def test_get_accounts():
|
||||
res = amazon.get_accounts(env)
|
||||
|
||||
assert len(res) == 1
|
||||
email, pwd = res[0]
|
||||
assert email == 'test@example.com'
|
||||
assert pwd == 'password123'
|
||||
assert res[0].email == 'test@example.com'
|
||||
assert res[0].password == 'password123'
|
||||
|
||||
|
||||
def test_get_accounts_numbered():
|
||||
@@ -22,9 +21,8 @@ def test_get_accounts_numbered():
|
||||
res = amazon.get_accounts(env)
|
||||
|
||||
assert len(res) == 1
|
||||
email, pwd = res[0]
|
||||
assert email == 'test@example.com'
|
||||
assert pwd == 'password123'
|
||||
assert res[0].email == 'test@example.com'
|
||||
assert res[0].password == 'password123'
|
||||
|
||||
|
||||
def test_get_accounts_numbered_multi():
|
||||
@@ -38,13 +36,11 @@ def test_get_accounts_numbered_multi():
|
||||
|
||||
assert len(res) == 2
|
||||
|
||||
email1, pwd1 = res[0]
|
||||
assert email1 == 'test@example.com'
|
||||
assert pwd1 == 'password123'
|
||||
assert res[0].email == 'test@example.com'
|
||||
assert res[0].password == 'password123'
|
||||
|
||||
email2, pwd2 = res[1]
|
||||
assert email2 == 'test2@example.com'
|
||||
assert pwd2 == 'password456'
|
||||
assert res[1].email == 'test2@example.com'
|
||||
assert res[1].password == 'password456'
|
||||
|
||||
|
||||
def test_get_accounts_both():
|
||||
@@ -57,10 +53,9 @@ def test_get_accounts_both():
|
||||
res = amazon.get_accounts(env)
|
||||
|
||||
assert len(res) == 2
|
||||
email1, pwd1 = res[0]
|
||||
assert email1 == 'test@example.com'
|
||||
assert pwd1 == 'password123'
|
||||
|
||||
email2, pwd2 = res[1]
|
||||
assert email2 == 'test2@example.com'
|
||||
assert pwd2 == 'password456'
|
||||
assert res[0].email == 'test@example.com'
|
||||
assert res[0].password == 'password123'
|
||||
|
||||
assert res[1].email == 'test2@example.com'
|
||||
assert res[1].password == 'password456'
|
||||
|
||||
Reference in New Issue
Block a user