class ParserTestCase(unittest.TestCase): lines = ['<select class="select" style="margin: 0 2px 0 0; margin-top: 4px; float: left; width: 145px; max-width: 145px;" name="resolution" onChange="javascript:imgload(\'ithilien\', this,\'2949\')">'] expected = ['/wallpaper/7yz4ma1/2949_ithilien_1024x768.jpg'] def setUp(self): self.parser = Parser() def testParse(self): current = self.parser.parse(self.lines, '1024x768') for i in range(len(current)): self.assertEquals(self.expected[i], current[i], 'Entry incorrect')
def setUp(self): self.parser = Parser()