From a946d02c37d2078e7869e44fd794309dc035c144 Mon Sep 17 00:00:00 2001 From: Egor Kostan Date: Fri, 4 Oct 2019 19:29:20 -0700 Subject: [PATCH] Update internal_func_negative_test.py --- tests/unit/internal_func_negative_test.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/unit/internal_func_negative_test.py b/tests/unit/internal_func_negative_test.py index 97f2a52..1094963 100644 --- a/tests/unit/internal_func_negative_test.py +++ b/tests/unit/internal_func_negative_test.py @@ -10,7 +10,8 @@ import allure import unittest -from api.cars_app import check_auth + +from api.authentication_helper import AuthenticationHelper from data.users import Users @@ -24,7 +25,6 @@ class InternalFuncNegativeTestCase(unittest.TestCase): @classmethod def setUpClass(cls) -> None: - with allure.step("Arrange test data"): cls.admin_user = {"name": "qxf2", "password": "123", @@ -35,15 +35,13 @@ def setUpClass(cls) -> None: "perm": "non_admin"} def test_check_auth_wrong_admin(self): - with allure.step("Verify check_auth flag using admin user"): - self.assertFalse(check_auth(username=self.admin_user["name"], - password=self.admin_user["password"], - user_list=Users().get_users())) + self.assertFalse(AuthenticationHelper.check_auth(username=self.admin_user["name"], + password=self.admin_user["password"], + user_list=Users().get_users())) def test_check_auth_wrong_non_admin(self): - with allure.step("Verify check_auth flag using non admin user"): - self.assertFalse(check_auth(username=self.non_admin_user["name"], - password=self.non_admin_user["password"], - user_list=Users().get_users())) + self.assertFalse(AuthenticationHelper.check_auth(username=self.non_admin_user["name"], + password=self.non_admin_user["password"], + user_list=Users().get_users()))