fix Booxtreem LOCAL_TEST
parent
ab3c1934d5
commit
8b385d05ed
|
@ -64,9 +64,9 @@ class BooXtream(object):
|
|||
boox = Boox.objects.create(
|
||||
download_link_epub='https://github.com/eshellman/42_ebook/blob/master/download/42.epub?raw=true&extra=download.booxtream.com/',
|
||||
download_link_mobi='https://github.com/eshellman/42_ebook/blob/master/download/42.mobi?raw=true',
|
||||
referenceid= kwargs.get('referenceid'),
|
||||
downloads_remaining= kwargs.get('downloadlimit'),
|
||||
expirydays=kwargs.get('expirydays'),
|
||||
referenceid= kwargs.get('referenceid', '42'),
|
||||
downloads_remaining= kwargs.get('downloadlimit', 10),
|
||||
expirydays=kwargs.get('expirydays', 30),
|
||||
)
|
||||
return boox
|
||||
|
||||
|
|
|
@ -23,13 +23,15 @@ class TestBooXtream(unittest.TestCase):
|
|||
return manager
|
||||
|
||||
def test_booxtream_errors(self):
|
||||
if settings.LOCAL_TEST:
|
||||
return
|
||||
from .exceptions import BooXtreamError
|
||||
inst = self._makeOne()
|
||||
if not settings.BOOXTREAM_API_KEY:
|
||||
return
|
||||
with self.assertRaises(BooXtreamError) as cm:
|
||||
inst.platform()
|
||||
self.assertIn( 'expirydays not set',str(cm.exception))
|
||||
self.assertIn('expirydays not set', str(cm.exception))
|
||||
params={
|
||||
'customername': 'Jane Test',
|
||||
'languagecode':'1043',
|
||||
|
|
Loading…
Reference in New Issue