Ejemplo n.º 1
0
def test_get_series_info(name, app):
    with app.test_client():
        browser = NaverBrowser()
        browser.session = Mock()
        browser.session.get.side_effect = lambda url, **kwargs: mock_obj(
            url=url, content=read_fixture('{}.html'.format(name)))
        assert (browser.get_series_info(25455) == read_fixture(
            '{}.parsed.yaml'.format(name)))
Ejemplo n.º 2
0
def test_get_series_info(name, app):
    with app.test_client():
        browser = NaverBrowser()
        browser.session = Mock()
        browser.session.get.side_effect = lambda url, **kwargs: mock_obj(
            url=url, content=read_fixture('{}.html'.format(name)))
        assert (browser.get_series_info(25455) ==
                read_fixture('{}.parsed.yaml'.format(name)))
Ejemplo n.º 3
0
def test_get_series_list(app):
    with app.test_client():
        browser = NaverBrowser()
        browser.session = Mock()
        browser.session.get.side_effect = lambda url, **kwargs: mock_obj(
            url=url, content=read_fixture('weekday.nhn.html'))
        assert (browser.get_series_list() == read_fixture(
            'weekday.nhn.parsed.yaml'))
Ejemplo n.º 4
0
def test_get_series_list(app):
    with app.test_client():
        browser = NaverBrowser()
        browser.session = Mock()
        browser.session.get.side_effect = lambda url, **kwargs: mock_obj(
            url=url, content=read_fixture('weekday.nhn.html'))
        assert (browser.get_series_list() ==
                read_fixture('weekday.nhn.parsed.yaml'))