class testBaseParser(unittest.TestCase):
    def setUp(self):
        self.normal_parser = UrlParser("http://proxy-test.com", bandwidthKBs=50)
        self.no_bdwidthParser = UrlParser("http://slow-proxy.com")

    def test_normal_parser(self):
        self.assertEqual(self.normal_parser.get_URl(), "http://proxy-test.com", "incorrect parser URL")
        self.assertEqual(self.normal_parser.get_min_bandwidth(), 50, "incorrect parser bandwidth")

    def test_no_bdwidth_parser(self):
        self.assertEqual(self.no_bdwidthParser.get_URl(), "http://slow-proxy.com", "incorrect parser URL")
        self.assertEqual(self.no_bdwidthParser.get_min_bandwidth(), 150, "incorrect parser bandwidth")
 def __init__(self, web_url):
     UrlParser.__init__(self, web_url)
 def __init__(self, web_url, bandwithdh=None):
     UrlParser.__init__(self, web_url, bandwithdh)
 def setUp(self):
     self.normal_parser = UrlParser("http://proxy-test.com", bandwidthKBs=50)
     self.no_bdwidthParser = UrlParser("http://slow-proxy.com")