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