def test_alter_password_with_short_new_password(self):
        with allure.step(
                'Send alter password request with short new password'):
            alter_password_with_short_new_password = SendRequest(
                AlterPassword.get_test_case(
                    "test_alter_password_with_short_new_password"))

        with allure.step("Checking msg"):
            allure.attach(
                "Msg contains: " + constants.ERR_MSG_NEW_PASSWORD_TOO_SHORT,
                "Expected")
            allure.attach(
                "Msg: " + alter_password_with_short_new_password.get_msg(),
                "Actual:")
            assert constants.ERR_MSG_NEW_PASSWORD_TOO_SHORT in alter_password_with_short_new_password.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " +
                str(alter_password_with_short_new_password.get_ret()),
                "Actual:")
            assert alter_password_with_short_new_password.get_ret(
            ) == constants.RET_400
Ejemplo n.º 2
0
    def test_login_without_app_key(self):
        with allure.step('Send an admin login request without app key'):
            login_without_app_key = SendRequest(Login.get_test_case("test_login_without_app_key"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_APP_KEY, "Expected:")
            allure.attach("Msg: " + login_without_app_key.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_APP_KEY in login_without_app_key.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(login_without_app_key.get_ret()), "Actual:")
            assert login_without_app_key.get_ret() == constants.RET_400
Ejemplo n.º 3
0
    def test_users_list_with_long_token(self):
        with allure.step("Send a get list request with long token"):
            users_list_with_long_token = SendRequest(UsersList.get_test_case("test_users_list_with_long_token"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + str(constants.ERR_MSG_LONG_TOKEN), "Expected:")
            allure.attach("Msg: " + str(users_list_with_long_token.get_msg()), "Actual:")
            assert constants.ERR_MSG_LONG_TOKEN in users_list_with_long_token.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(users_list_with_long_token.get_ret()), "Actual:")
            assert users_list_with_long_token.get_ret() == constants.RET_400
    def test_register_without_password(self):
        with allure.step('Send register request without password'):
            register_without_password = SendRequest(Register.get_test_case("test_register_without_password"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_PASSWORD, "Expected:")
            allure.attach("Msg: " + register_without_password.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_PASSWORD in register_without_password.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(register_without_password.get_ret()), "Actual:")
            assert register_without_password.get_ret() == constants.RET_400
    def test_users_list_without_app_key(self):
        with allure.step("Send a get list request without app key"):
            users_list_without_app_key = SendRequest(UsersList.get_test_case("test_users_list_without_app_key"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + str(constants.ERR_MSG_WITHOUT_APP_KEY), "Expected:")
            allure.attach("Msg: " + str(users_list_without_app_key.get_msg()), "Actual:")
            assert constants.ERR_MSG_WITHOUT_APP_KEY in users_list_without_app_key.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(users_list_without_app_key.get_ret()), "Actual:")
            assert users_list_without_app_key.get_ret() == constants.RET_400
Ejemplo n.º 6
0
    def test_login_with_short_username(self):
        with allure.step('Send a login request with short username'):
            login_with_short_username = SendRequest(Login.get_test_case("test_login_with_short_username"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_SHORT_USERNAME, "Expected:")
            allure.attach("Msg: " + login_with_short_username.get_msg(), "Actual:")
            assert constants.ERR_MSG_SHORT_USERNAME in login_with_short_username.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(login_with_short_username.get_ret()), "Actual:")
            assert login_with_short_username.get_ret() == constants.RET_400
    def test_register_without_username(self):
        with allure.step('Send register request without username'):
            register_without_username = SendRequest(Register.get_test_case("test_register_without_username"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_USERNAME, "Expected:")
            allure.attach("Msg: " + register_without_username.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_USERNAME in register_without_username.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(register_without_username.get_ret()), "Actual:")
            assert register_without_username.get_ret() == constants.RET_400
Ejemplo n.º 8
0
    def test_login_with_long_password(self):
        with allure.step('Send a login request with long password'):
            login_with_long_password = SendRequest(Login.get_test_case("test_login_with_long_password"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_LONG_PASSWORD, "Expected:")
            allure.attach("Msg: " + login_with_long_password.get_msg(), "Actual:")
            assert constants.ERR_MSG_LONG_PASSWORD in login_with_long_password.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(login_with_long_password.get_ret()), "Actual:")
            assert login_with_long_password.get_ret() == constants.RET_400
Ejemplo n.º 9
0
    def test_check_user_status_with_long_uuid(self):
        with allure.step("Send check user status request with long uuid"):
            check_user_status_with_long_uuid = SendRequest(
                CheckUserStatus.get_test_case("test_check_user_status_with_long_uuid"))

        with allure.step("Checking msg"):
            allure.attach("Msg contains: " + constants.ERR_MSG_LONG_UUID, "Expected")
            allure.attach("Msg: " + check_user_status_with_long_uuid.get_msg(), "Actual:")
            assert constants.ERR_MSG_LONG_UUID in check_user_status_with_long_uuid.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(check_user_status_with_long_uuid.get_ret()), "Actual:")
            assert check_user_status_with_long_uuid.get_ret() == constants.RET_400
    def test_alter_password_without_app_key(self):
        with allure.step('Send alter password request without app key'):
            alter_password_without_app_key = SendRequest(
                AlterPassword.get_test_case("test_alter_password_without_app_key"))

        with allure.step("Checking msg"):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_APP_KEY, "Expected")
            allure.attach("Msg: " + alter_password_without_app_key.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_APP_KEY in alter_password_without_app_key.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(alter_password_without_app_key.get_ret()), "Actual:")
            assert alter_password_without_app_key.get_ret() == constants.RET_400
Ejemplo n.º 11
0
    def test_logout_without_token(self):
        with allure.step('Send logout request without token'):
            log_out_without_token = SendRequest(
                Logout.get_test_case("test_logout_without_token",  constants.TMP_TOKEN))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_TOKEN, "Expected:")
            allure.attach("Msg: " + log_out_without_token.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_TOKEN in log_out_without_token.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(log_out_without_token.get_ret()), "Actual:")
            assert log_out_without_token.get_ret() == constants.RET_400
Ejemplo n.º 12
0
    def test_register_with_short_app_key(self):
        with allure.step("Send a register request with short app key"):
            register_with_short_app_key = SendRequest(
                Register.get_test_case("test_register_with_short_app_key"))

        with allure.step('Checking msg'):
            allure.attach("Msg contains: " + constants.ERR_MSG_SHORT_APP_KEY, "Expected:")
            allure.attach("Msg: " + register_with_short_app_key.get_msg(), "Actual:")
            assert constants.ERR_MSG_SHORT_APP_KEY in register_with_short_app_key.get_msg()

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(register_with_short_app_key.get_ret()), "Actual:")
            assert register_with_short_app_key.get_ret() == constants.RET_400
Ejemplo n.º 13
0
    def test_log_out_without_uuid(self):
        with allure.step("Send an admin logout request"):
            logout_without_uuid = SendRequest(
                Logout.get_test_case("test_logout_without_uuid",
                                     constants.TMP_TOKEN))

        with allure.step('Checking msg'):
            allure.attach("Msg contains " + constants.ERR_MSG_WITHOUT_UUID,
                          "Expected:")
            allure.attach("Msg: " + logout_without_uuid.get_msg(), "Actual:")
            assert constants.ERR_MSG_WITHOUT_UUID in logout_without_uuid.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(logout_without_uuid.get_ret()),
                          "Actual:")
            assert logout_without_uuid.get_ret() == constants.RET_400
Ejemplo n.º 14
0
    def test_log_out_with_short_app_key(self):
        with allure.step("Send logout request with short app key"):
            logout_with_short_app_key = SendRequest(
                Logout.get_test_case("test_logout_with_short_app_key",
                                     constants.TMP_TOKEN))

        with allure.step('Checking msg'):
            allure.attach("Msg contains:" + constants.ERR_MSG_SHORT_APP_KEY,
                          "Expected:")
            allure.attach("Msg: " + logout_with_short_app_key.get_msg(),
                          "Actual:")
            assert constants.ERR_MSG_SHORT_APP_KEY in logout_with_short_app_key.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach("Ret: " + str(logout_with_short_app_key.get_ret()),
                          "Actual:")
            assert logout_with_short_app_key.get_ret() == constants.RET_400
Ejemplo n.º 15
0
    def test_check_user_status_without_token(self):
        with allure.step("Send check user status request without token"):
            check_user_status_without_token = SendRequest(
                CheckUserStatus.get_test_case(
                    "test_check_user_status_without_token"))

        with allure.step("Checking msg"):
            allure.attach("Msg contains: " + constants.ERR_MSG_WITHOUT_TOKEN,
                          "Expected")
            allure.attach("Msg: " + check_user_status_without_token.get_msg(),
                          "Actual:")
            assert constants.ERR_MSG_WITHOUT_TOKEN in check_user_status_without_token.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " + str(check_user_status_without_token.get_ret()),
                "Actual:")
            assert check_user_status_without_token.get_ret(
            ) == constants.RET_400
    def test_users_list_with_101_per_page(self):
        with allure.step("Send a get list request with 101 per page"):
            users_list_with_101_per_page = SendRequest(
                UsersList.get_test_case("test_users_list_with_101_per_page"))

        with allure.step('Checking msg'):
            allure.attach(
                "Msg: " + str(constants.ERR_MSG_USERS_LIST_101_PER_PAGE),
                "Expected:")
            allure.attach(
                "Msg: " + str(users_list_with_101_per_page.get_msg()),
                "Actual:")
            assert constants.ERR_MSG_USERS_LIST_101_PER_PAGE in users_list_with_101_per_page.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " + str(users_list_with_101_per_page.get_ret()),
                "Actual:")
            assert users_list_with_101_per_page.get_ret() == constants.RET_400
Ejemplo n.º 17
0
    def test_alter_password_with_short_username(self):
        with allure.step('Send alter password request with short username'):
            alter_password_with_short_username = SendRequest(
                AlterPassword.get_test_case(
                    "test_alter_password_with_short_username"))

        with allure.step("Checking msg"):
            allure.attach("Msg contains: " + constants.ERR_MSG_SHORT_USERNAME,
                          "Expected")
            allure.attach(
                "Msg: " + alter_password_with_short_username.get_msg(),
                "Actual:")
            assert constants.ERR_MSG_SHORT_USERNAME in alter_password_with_short_username.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " + str(alter_password_with_short_username.get_ret()),
                "Actual:")
            assert alter_password_with_short_username.get_ret(
            ) == constants.RET_400
    def test_check_user_status_with_short_app_key(self):
        with allure.step("Send check user status request with short app key"):
            check_user_status_with_short_app_key = SendRequest(
                CheckUserStatus.get_test_case(
                    "test_check_user_status_with_short_app_key"))

        with allure.step("Checking msg"):
            allure.attach("Msg contains: " + constants.ERR_MSG_SHORT_APP_KEY,
                          "Expected")
            allure.attach(
                "Msg: " + check_user_status_with_short_app_key.get_msg(),
                "Actual:")
            assert constants.ERR_MSG_SHORT_APP_KEY in check_user_status_with_short_app_key.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " + str(check_user_status_with_short_app_key.get_ret()),
                "Actual:")
            assert check_user_status_with_short_app_key.get_ret(
            ) == constants.RET_400
    def test_alter_password_without_old_password(self):
        with allure.step('Send alter password request without old password'):
            alter_password_without_old_password = SendRequest(
                AlterPassword.get_test_case(
                    "test_alter_password_without_old_password"))

        with allure.step("Checking msg"):
            allure.attach(
                "Msg contains: " + constants.ERR_MSG_WITHOUT_OLD_PASSWORD,
                "Expected")
            allure.attach(
                "Msg: " + alter_password_without_old_password.get_msg(),
                "Actual:")
            assert constants.ERR_MSG_WITHOUT_OLD_PASSWORD in alter_password_without_old_password.get_msg(
            )

        with allure.step('Checking Ret'):
            allure.attach("Ret: " + str(constants.RET_400), "Expected:")
            allure.attach(
                "Ret: " + str(alter_password_without_old_password.get_ret()),
                "Actual:")
            assert alter_password_without_old_password.get_ret(
            ) == constants.RET_400