Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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, '')