Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Update internal_func_negative_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Oct 5, 2019
1 parent 02a1bc3 commit a946d02
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/unit/internal_func_negative_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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",
Expand All @@ -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()))

0 comments on commit a946d02

Please sign in to comment.