Exemplo n.º 1
0
 def test_02_dvds(self):
     mediatest = MediaObject()
     mediatest.barcode = '5030305514860'
     response = mediatest.getbybarcode()
     assert '<ERROR> No category defined.' in response
     mediatest = MediaObject(category='DVD')
     response = mediatest.getbybarcode()
     assert '<ERROR> No barcode defined.' in response
     mediatest.barcode = '5030305514861'
     response = mediatest.getbybarcode()
     assert '<WARNING>Barcode 5030305514861 not found on www.yoopsie.com in DVD' in response
     mediatest.barcode = '5030305514860'
     response = mediatest.getbybarcode()
     assert '<OK>Gnomeo & Juliet [DVD]:' in response
Exemplo n.º 2
0
 def test_02_dvds(self):
     mediatest = MediaObject()
     mediatest.barcode = '5030305514860'
     response = mediatest.getbybarcode()
     assert '<ERROR> No category defined.' in response
     mediatest = MediaObject(category='DVD')
     response = mediatest.getbybarcode()
     assert '<ERROR> No barcode defined.' in response
     mediatest.barcode = '5030305514861'
     response = mediatest.getbybarcode()
     assert '<WARNING>Barcode 5030305514861 not found on www.yoopsie.com in DVD' in response
     mediatest.barcode = '5030305514860'
     response = mediatest.getbybarcode()
     assert '<OK>Gnomeo & Juliet [DVD]:' in response
Exemplo n.º 3
0
 def test_02_books(self):
     """
     Test acquiring book data based on barcodes.
     :return:
     """
     mediatest = MediaObject()
     mediatest.barcode = '9780007304462'
     response = mediatest.getbybarcode()
     assert '<ERROR> No category defined.' in response
     mediatest = MediaObject(category='Books')
     response = mediatest.getbybarcode()
     assert '<ERROR> No barcode defined.' in response
     mediatest.barcode = '9780007304461'
     response = mediatest.getbybarcode()
     assert '<WARNING>Barcode 9780007304461 not found on www.yoopsie.com in Books' in response
     mediatest.barcode = '9780007304462'
     response = mediatest.getbybarcode()
     assert '<OK>Azincourt:' in response
Exemplo n.º 4
0
 def test_02_books(self):
     """
     Test acquiring book data based on barcodes.
     :return:
     """
     mediatest = MediaObject()
     mediatest.barcode = '9780007304462'
     response = mediatest.getbybarcode()
     assert '<ERROR> No category defined.' in response
     mediatest = MediaObject(category='Books')
     response = mediatest.getbybarcode()
     assert '<ERROR> No barcode defined.' in response
     mediatest.barcode = '9780007304461'
     response = mediatest.getbybarcode()
     assert '<WARNING>Barcode 9780007304461 not found on www.yoopsie.com in Books' in response
     mediatest.barcode = '9780007304462'
     response = mediatest.getbybarcode()
     assert '<OK>Azincourt:' in response