예제 #1
0
파일: test.py 프로젝트: stxRand/pythonpath
    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)
예제 #2
0
파일: test.py 프로젝트: stxRand/pythonpath
    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, '')