def setUp(self):
     self.user_login = UserLogin()
     self.product_search = ProductSearch(self.user_login.base_page)
     test_data = yaml.load(open('test.yaml', 'r'))
     self.user_name = test_data['UNIT_TEST']['login_user']
     self.password = test_data['UNIT_TEST']['password']
     self.short_name = test_data['UNIT_TEST']['short_name']
     self.product_name = test_data['UNIT_TEST']['product_name']
     self.user_login.login(self.user_name, self.password, self.short_name)
class ProductSearchTest(unittest.TestCase):
    def setUp(self):
        self.user_login = UserLogin()
        self.product_search = ProductSearch(self.user_login.base_page)
        test_data = yaml.load(open('test.yaml', 'r'))
        self.user_name = test_data['UNIT_TEST']['login_user']
        self.password = test_data['UNIT_TEST']['password']
        self.short_name = test_data['UNIT_TEST']['short_name']
        self.product_name = test_data['UNIT_TEST']['product_name']
        self.user_login.login(self.user_name, self.password, self.short_name)

    def test_search_product(self):
        self.product_search.search_product(self.product_name, 'first_item')

    def tearDown(self):
        pass
Beispiel #3
0
class LoginTest(unittest.TestCase):
    def setUp(self):
        self.user_login = UserLogin()
        test_data = yaml.load(open('test.yaml', 'r'))
        self.user_name = test_data['UNIT_TEST']['login_user']
        self.password = test_data['UNIT_TEST']['password']
        self.short_name = test_data['UNIT_TEST']['short_name']

    def test_login(self):
        assert self.user_login.login(
            self.user_name, self.password,
            self.short_name), "login test is not successful"

    def test_check_already_login(self):
        self.user_login.check_already_login(self.short_name)

    def tearDown(self):
        pass
 def setUp(self):
     user_login = UserLogin()
     self.product_purchase = PurchasePoduct(user_login.base_page)
     test_data = yaml.load(open('purchase_flow.yaml', 'r'))
     self.user_name = test_data['TEST_PURCHASE_FLOW']['login_user']
     self.password = test_data['TEST_PURCHASE_FLOW']['password']
     self.short_name = test_data['TEST_PURCHASE_FLOW']['short_name']
     self.product_name = test_data['TEST_PURCHASE_FLOW']['product_name']
     user_login = UserLogin()
     self.product_purchase = PurchasePoduct(user_login.base_page)
     user_login.login(self.user_name, self.password, self.short_name)
Beispiel #5
0
 def setUp(self):
     self.user_login = UserLogin()
     test_data = yaml.load(open('test.yaml', 'r'))
     self.user_name = test_data['UNIT_TEST']['login_user']
     self.password = test_data['UNIT_TEST']['password']
     self.short_name = test_data['UNIT_TEST']['short_name']