commit 6aeac38dcf0fa31b45f63b455f0dc1a143a281b7
parent f178af099ff2f39dc86612679190e15c707c7a3b
Author: ms <ms@taler.net>
Date: Sat, 30 Jan 2021 13:04:47 +0100
test operation with new password
Diffstat:
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
@@ -135,14 +135,39 @@ def teardown_function():
dropSandboxTables()
dropNexusTables()
-def test_change_password():
+# def test_double_username():
+
+
+def test_change_nonadmin_password():
assertResponse(
- post(f"{PERSONA.nexus.base_url}/users/password",
+ post(f"{PERSONA.nexus.base_url}/users",
auth=PERSONA.nexus.auth,
+ json=dict(username="nonadmin", password="secret")
+ )
+ )
+
+ resp = assertResponse(
+ get(
+ f"{PERSONA.nexus.base_url}/bank-accounts",
+ auth=auth.HTTPBasicAuth("nonadmin", "secret")
+ )
+ )
+
+ assertResponse(
+ post(f"{PERSONA.nexus.base_url}/users/password",
+ auth=auth.HTTPBasicAuth("nonadmin", "secret"),
json=dict(newPassword="changed")
)
)
+ resp = assertResponse(
+ get(
+ f"{PERSONA.nexus.base_url}/bank-accounts",
+ auth=auth.HTTPBasicAuth("nonadmin", "changed")
+ )
+ )
+
+
def test_connection_deletion():
resp = assertResponse(
get(