예제 #1
0
def _fixture(fixture, uri):
    test_page = page.get_instance(
        uri=uri
    )
    test_page.client = fixture

    return test_page
예제 #2
0
def test_page_get_instance_creates_page_object():
    """Test page.get_instance creates a Page object."""
    test_page = page.get_instance(TEST_URI)
    expected_repr = "<class 'parker.page.Page'>(%s)" % (TEST_URI)

    assert isinstance(test_page, page.Page) is True
    assert isinstance(test_page.client, client.Client) is True
    assert test_page.__repr__() == expected_repr
예제 #3
0
def test_get_instance_creates_page_object():
    """Test page.get_instance creates a Page object."""
    test_page = page.get_instance(TEST_URI)
    expected_repr = "<class 'parker.page.Page'>(%s)" % (
        TEST_URI
    )

    assert isinstance(test_page, page.Page)
    assert isinstance(test_page.client, client.Client)
    assert test_page.__repr__() == expected_repr
예제 #4
0
파일: test_page.py 프로젝트: imclab/parker
def page_fixture(client_fixture):
    """Test fixture to ensure correct mocking for page."""
    return page.get_instance(
        uri=TEST_URI,
        page_client=client_fixture
    )
예제 #5
0
def page_fixture(client_fixture):
    """Test fixture to ensure correct mocking for page."""
    return page.get_instance(uri=TEST_URI, page_client=client_fixture)