Пример #1
0
def test_asserts_equals():
    """TODO: doc method"""
    Assert().equals("equals", "equals")
Пример #2
0
def test_asserts_create():
    """TODO: doc method"""
    asserts = Assert()
    assert type(asserts) == Assert
Пример #3
0
def test_asserts_regexurl_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().regex_url("noturl")
Пример #4
0
def test_asserts_greaterorequals_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().greater_or_equals(0, 1)
Пример #5
0
def test_asserts_notinlist_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().not_in_list(1, [1, 2])
Пример #6
0
def test_asserts_false_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().false(True)
Пример #7
0
def test_asserts_notequals_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().not_equals("equals", "equals")
Пример #8
0
def test_asserts_lower():
    """TODO: doc method"""
    Assert().lower(0, 1)
Пример #9
0
def test_asserts_inlist():
    """TODO: doc method"""
    Assert().in_list(0, [0, 1])
Пример #10
0
def test_asserts_lowerorequals():
    """TODO: doc method"""
    Assert().lower_or_equals(0, 1)
Пример #11
0
def test_asserts_greater():
    """TODO: doc method"""
    Assert().greater(1, 0)
Пример #12
0
def test_asserts_greaterorequals():
    """TODO: doc method"""
    Assert().greater_or_equals(1, 0)
Пример #13
0
def test_asserts_isinstance(class_type):
    """TODO: doc method"""
    Assert().is_instance("text", class_type)
Пример #14
0
def test_asserts_notequals():
    """TODO: doc method"""
    Assert().not_equals("equals", "notequals")
Пример #15
0
def test_asserts_pathnotexist_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().path_not_exist("./")
Пример #16
0
def test_asserts_notinlist():
    """TODO: doc method"""
    Assert().not_in_list(0, [1, 2])
Пример #17
0
def test_asserts_true_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().true(False)
Пример #18
0
def test_asserts_regex():
    """TODO: doc method"""
    Assert().regex("https://netzulo.tk:83", ASSERT_REGEX_URL)
Пример #19
0
def test_asserts_notnone_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().not_none(None)
Пример #20
0
def test_asserts_notregex():
    """TODO: doc method"""
    Assert().not_regex("htttp://lol", ASSERT_REGEX_URL)
Пример #21
0
def test_asserts_isinstance_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().is_instance("text", int)
Пример #22
0
def test_asserts_regexurl():
    """TODO: doc method"""
    Assert().regex_url("https://netzulo.tk:83")
Пример #23
0
def test_asserts_lowerorequals_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().lower_or_equals(1, 0)
Пример #24
0
def test_asserts_pathexist():
    """TODO: doc method"""
    Assert().path_exist("./")
Пример #25
0
def test_asserts_regex_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().regex("doesnotexist", ASSERT_REGEX_URL)
Пример #26
0
def test_asserts_pathnotexist():
    """TODO: doc method"""
    Assert().path_not_exist("doesnotexist/")
Пример #27
0
def test_asserts_notregex_raises():
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().not_regex("http://netzulo.tk:83", ASSERT_REGEX_URL)
Пример #28
0
def test_asserts_pathexist_raises(path):
    """TODO: doc method"""
    with pytest.raises(AssertionError):
        Assert().path_exist(path)
Пример #29
0
# -*- 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):
Пример #30
0
def test_asserts_notnone():
    """TODO: doc method"""
    Assert().not_none(":)")