def test_empty_search(self): """testing allegro class offer empty string search""" allegro = Allegro('') price = allegro.get_lowest_price() url = allegro.get_offer_url() self.assertIsInstance(price, Decimal) self.assertTrue(price >= Decimal(0.0)) self.assertIsInstance(url, str)
def test_search(self): """testing allegro class offer search""" allegro = Allegro('"Aparat Sony nex-7"') price = allegro.get_lowest_price() url = allegro.get_offer_url() self.assertIsInstance(price, Decimal) self.assertTrue(price >= Decimal(0.0)) self.assertIsInstance(url, str) self.assertNotEqual(url, '')