test for user modify CLI
@@ -72,6 +72,27 @@ def test_cli_user_show(qcfractal_base_init):
assert testing.run_process(args, **_options) is False
+@testing.mark_slow
+def test_cli_user_modify(qcfractal_base_init):
+ args = ["qcfractal-server", "user", qcfractal_base_init, "add", "test_user_modify", "--permissions", "read"]
+ assert testing.run_process(args, **_options)
+
+ args = ["qcfractal-server", "user", qcfractal_base_init, "modify", "test_user_modify",
+ "--permissions", "read", "write", "--reset-password"]
+ assert testing.run_process(args, **_options)
+
+ args = ["qcfractal-server", "user", qcfractal_base_init, "modify", "test_user_modify",
+ "--password", "foopass"]
+ assert testing.run_process(args, **_options)
+
+ args = ["qcfractal-server", "user", qcfractal_base_init, "modify", "test_user_modify",
+ "--permissions", "read"]
+ assert testing.run_process(args, **_options)
+
+ args = ["qcfractal-server", "user", qcfractal_base_init, "modify", "badname_1234"]
+ assert testing.run_process(args, **_options) is False
+
+
@testing.mark_slow
def test_cli_user_remove(qcfractal_base_init):
args = ["qcfractal-server", "user", qcfractal_base_init, "add", "test_user_remove", "--permissions", "admin"]
