def test_asserts_equals(): """TODO: doc method""" Assert().equals("equals", "equals")
def test_asserts_create(): """TODO: doc method""" asserts = Assert() assert type(asserts) == Assert
def test_asserts_regexurl_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().regex_url("noturl")
def test_asserts_greaterorequals_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().greater_or_equals(0, 1)
def test_asserts_notinlist_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().not_in_list(1, [1, 2])
def test_asserts_false_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().false(True)
def test_asserts_notequals_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().not_equals("equals", "equals")
def test_asserts_lower(): """TODO: doc method""" Assert().lower(0, 1)
def test_asserts_inlist(): """TODO: doc method""" Assert().in_list(0, [0, 1])
def test_asserts_lowerorequals(): """TODO: doc method""" Assert().lower_or_equals(0, 1)
def test_asserts_greater(): """TODO: doc method""" Assert().greater(1, 0)
def test_asserts_greaterorequals(): """TODO: doc method""" Assert().greater_or_equals(1, 0)
def test_asserts_isinstance(class_type): """TODO: doc method""" Assert().is_instance("text", class_type)
def test_asserts_notequals(): """TODO: doc method""" Assert().not_equals("equals", "notequals")
def test_asserts_pathnotexist_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().path_not_exist("./")
def test_asserts_notinlist(): """TODO: doc method""" Assert().not_in_list(0, [1, 2])
def test_asserts_true_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().true(False)
def test_asserts_regex(): """TODO: doc method""" Assert().regex("https://netzulo.tk:83", ASSERT_REGEX_URL)
def test_asserts_notnone_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().not_none(None)
def test_asserts_notregex(): """TODO: doc method""" Assert().not_regex("htttp://lol", ASSERT_REGEX_URL)
def test_asserts_isinstance_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().is_instance("text", int)
def test_asserts_regexurl(): """TODO: doc method""" Assert().regex_url("https://netzulo.tk:83")
def test_asserts_lowerorequals_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().lower_or_equals(1, 0)
def test_asserts_pathexist(): """TODO: doc method""" Assert().path_exist("./")
def test_asserts_regex_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().regex("doesnotexist", ASSERT_REGEX_URL)
def test_asserts_pathnotexist(): """TODO: doc method""" Assert().path_not_exist("doesnotexist/")
def test_asserts_notregex_raises(): """TODO: doc method""" with pytest.raises(AssertionError): Assert().not_regex("http://netzulo.tk:83", ASSERT_REGEX_URL)
def test_asserts_pathexist_raises(path): """TODO: doc method""" with pytest.raises(AssertionError): Assert().path_exist(path)
# -*- coding: utf-8 -*- """Package for suites and tests related to bots.modules package""" import pytest from qacode.core.bots.modules.nav_base import NavBase from qacode.core.exceptions.core_exception import CoreException from qacode.core.testing.asserts import Assert from qacode.core.testing.test_info import TestInfoBotUnique from qacode.utils import settings from selenium.webdriver.remote.webelement import WebElement ASSERT = Assert() SETTINGS = settings(file_path="qacode/configs/") SKIP_NAVS = SETTINGS['tests']['skip']['bot_navigations'] SKIP_NAVS_MSG = 'bot_navigations DISABLED by config file' class TestNavBase(TestInfoBotUnique): """Test Suite for class NavBase""" app = None page = None @classmethod def setup_class(cls, **kwargs): """Setup class (suite) to be executed""" super(TestNavBase, cls).setup_class(config=settings(file_path="qacode/configs/"), skip_force=SKIP_NAVS) def setup_method(self, test_method, close=True):
def test_asserts_notnone(): """TODO: doc method""" Assert().not_none(":)")