def _fixture(fixture, uri): test_page = page.get_instance( uri=uri ) test_page.client = fixture return test_page
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
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
def page_fixture(client_fixture): """Test fixture to ensure correct mocking for page.""" return page.get_instance( uri=TEST_URI, page_client=client_fixture )
def page_fixture(client_fixture): """Test fixture to ensure correct mocking for page.""" return page.get_instance(uri=TEST_URI, page_client=client_fixture)