mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Guarded test_Amazon against not having a license key.
This commit is contained in:
parent
daf8177bff
commit
ef3ea98c92
@ -31,26 +31,33 @@
|
||||
|
||||
from testsupport import *
|
||||
|
||||
class AmazonTestCase(PluginTestCase, PluginDocumentation):
|
||||
LICENSE_KEY = 'INITIAL_NON_LICENSE_KEY'
|
||||
|
||||
if LICENSE_KEY != 'INITIAL_NON_LICENSE_KEY':
|
||||
class AmazonTestCase(PluginTestCase, PluginDocumentation):
|
||||
plugins = ('Amazon',)
|
||||
def setUp(self):
|
||||
PluginTestCase.setUp(self)
|
||||
self.assertNotError('licensekey test')
|
||||
self.assertNotError('licensekey %s' % LICENSE_KEY)
|
||||
|
||||
def testIsbn(self):
|
||||
self.assertHelp('isbn')
|
||||
self.assertRegexp('isbn 0738203793', r'Buckminster Fuller\'s Universe')
|
||||
self.assertRegexp('isbn --url 0738203793', r'Buck.*/exec/obidos/ASIN')
|
||||
self.assertRegexp('isbn 0738203793',
|
||||
r'Buckminster Fuller\'s Universe')
|
||||
self.assertRegexp('isbn --url 0738203793',
|
||||
r'Buck.*/exec/obidos/ASIN')
|
||||
|
||||
def testAsin(self):
|
||||
self.assertHelp('asin')
|
||||
self.assertRegexp('asin B00005JM5E', r'Pirates of the Caribbean')
|
||||
self.assertRegexp('asin --url B00005JM5E', r'Pirate.*ASIN/B00005JM5E')
|
||||
self.assertRegexp('asin --url B00005JM5E',
|
||||
r'Pirate.*ASIN/B00005JM5E')
|
||||
|
||||
def testUpc(self):
|
||||
self.assertHelp('upc')
|
||||
self.assertRegexp('upc 093624586425', r'Short Bus')
|
||||
self.assertRegexp('upc --url 093624586425', r'Short Bus.*/exec/obidos')
|
||||
self.assertRegexp('upc --url 093624586425',
|
||||
r'Short Bus.*/exec/obidos')
|
||||
|
||||
def testAuthor(self):
|
||||
self.assertHelp('author')
|
||||
@ -61,7 +68,8 @@ class AmazonTestCase(PluginTestCase, PluginDocumentation):
|
||||
self.assertHelp('artist')
|
||||
self.assertRegexp('artist rahzel', r'Audio CD')
|
||||
self.assertRegexp('artist --url rahzel', r'Audio CD.*/exec/obidos')
|
||||
self.assertRegexp('artist --classical rahzel', r'No items were found')
|
||||
self.assertRegexp('artist --classical rahzel',
|
||||
r'No items were found')
|
||||
self.assertRegexp('artist --classical vivaldi', r'Audio CD')
|
||||
|
||||
def testActor(self):
|
||||
@ -77,7 +85,8 @@ class AmazonTestCase(PluginTestCase, PluginDocumentation):
|
||||
self.assertRegexp('director --url gore verbinski',
|
||||
r'DVD.*/exec/obidos/')
|
||||
self.assertRegexp('director --vhs gore verbinski', r'VHS Tape')
|
||||
self.assertRegexp('director --video gore verbinski', r'DVD|VHS Tape')
|
||||
self.assertRegexp('director --video gore verbinski',
|
||||
r'DVD|VHS Tape')
|
||||
|
||||
def testManufacturer(self):
|
||||
self.assertHelp('manufacturer')
|
||||
|
Loading…
Reference in New Issue
Block a user