예제 #1
0
파일: test_buku.py 프로젝트: usm4n/Buku
def test_get_page_title():
    """test func."""
    resp = mock.Mock()
    parser = mock.Mock()
    with mock.patch('buku.BukuHTMLParser', return_value=parser):
        import buku
        res = buku.get_page_title(resp)
        assert res == parser.parsed_title
예제 #2
0
def test_get_page_title():
    """test func."""
    resp = mock.Mock()
    parser = mock.Mock()
    with mock.patch('buku.BukuHTMLParser', return_value=parser):
        import buku
        res = buku.get_page_title(resp)
        assert res == parser.parsed_title