import unittest

from vendcrawler.scripts.vendcrawler import VendCrawler

class TestVendCrawlerMethods(unittest.TestCase):

    def test_get_links(self):
        links = VendCrawler('a', 'b', 'c').get_links(2)
        self.assertEqual(links, 
                         ['https://sarahserver.net/?module=vendor&p=1',
                          'https://sarahserver.net/?module=vendor&p=2'])

    def test_get_page_count(self):
        with open('test_vendcrawler.html', 'r') as f:
            data = f.read()
        page_count = VendCrawler('a', 'b', 'c').get_page_count(str(data))
        self.assertEqual(int(page_count), 84)

if __name__ == '__main__':
    unittest.main()

[((20, 4, 20, 19), 'unittest.main', 'unittest.main', ({}, {}), '()', False, 'import unittest\n'), ((8, 16, 8, 42), 'vendcrawler.scripts.vendcrawler.VendCrawler', 'VendCrawler', ({(8, 28, 8, 31): '"""a"""', (8, 33, 8, 36): '"""b"""', (8, 38, 8, 41): '"""c"""'}, {}), "('a', 'b', 'c')", False, 'from vendcrawler.scripts.vendcrawler import VendCrawler\n'), ((16, 21, 16, 47), 'vendcrawler.scripts.vendcrawler.VendCrawler', 'VendCrawler', ({(16, 33, 16, 36): '"""a"""', (16, 38, 16, 41): '"""b"""', (16, 43, 16, 46): '"""c"""'}, {}), "('a', 'b', 'c')", False, 'from vendcrawler.scripts.vendcrawler import VendCrawler\n')]