From 6e2cc333f250cc50529a00b0138e8bbf78366e2a Mon Sep 17 00:00:00 2001 From: Shahrustam Date: Fri, 24 Apr 2020 11:57:17 +0300 Subject: [PATCH] disable pio account change password and username update tests --- tests/commands/test_account.py | 61 ++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/tests/commands/test_account.py b/tests/commands/test_account.py index b0a878ca..20b02734 100644 --- a/tests/commands/test_account.py +++ b/tests/commands/test_account.py @@ -295,24 +295,6 @@ def test_account_token(clirunner, credentials, validate_cliresult, isolated_pio_ assert json_result.get("result") == token token = json_result.get("result") - result = clirunner.invoke( - cmd_account, - [ - "token", - "--password", - credentials["password"], - "--json-output", - "--regenerate", - ], - ) - validate_cliresult(result) - json_result = json.loads(result.output.strip()) - assert json_result - assert json_result.get("status") == "success" - assert json_result.get("result") - assert token != json_result.get("result") - token = json_result.get("result") - clirunner.invoke(cmd_account, ["logout"]) result = clirunner.invoke( @@ -342,6 +324,48 @@ def test_account_token(clirunner, credentials, validate_cliresult, isolated_pio_ clirunner.invoke(cmd_account, ["logout"]) +@pytest.mark.skip_ci +def test_account_token_with_refreshing( + clirunner, credentials, validate_cliresult, isolated_pio_home +): + try: + result = clirunner.invoke( + cmd_account, + ["login", "-u", credentials["login"], "-p", credentials["password"]], + ) + validate_cliresult(result) + + result = clirunner.invoke( + cmd_account, + ["token", "--password", credentials["password"], "--json-output"], + ) + validate_cliresult(result) + json_result = json.loads(result.output.strip()) + assert json_result + assert json_result.get("status") == "success" + assert json_result.get("result") + token = json_result.get("result") + + result = clirunner.invoke( + cmd_account, + [ + "token", + "--password", + credentials["password"], + "--json-output", + "--regenerate", + ], + ) + validate_cliresult(result) + json_result = json.loads(result.output.strip()) + assert json_result + assert json_result.get("status") == "success" + assert json_result.get("result") + assert token != json_result.get("result") + finally: + clirunner.invoke(cmd_account, ["logout"]) + + def test_account_summary(clirunner, credentials, validate_cliresult, isolated_pio_home): try: result = clirunner.invoke(cmd_account, ["show"],) @@ -426,6 +450,7 @@ def test_account_profile_update_with_invalid_password( clirunner.invoke(cmd_account, ["logout"]) +@pytest.mark.skip_ci def test_account_profile_update_only_firstname_and_lastname( clirunner, credentials, validate_cliresult, isolated_pio_home ):