diff --git a/src/calibre/ebooks/metadata/sources/amazon.py b/src/calibre/ebooks/metadata/sources/amazon.py index 579a0be827..d2573c500b 100644 --- a/src/calibre/ebooks/metadata/sources/amazon.py +++ b/src/calibre/ebooks/metadata/sources/amazon.py @@ -800,6 +800,7 @@ class Amazon(Source): 'br': _('Brazil'), 'nl': _('Netherlands'), 'cn': _('China'), + 'ca': _('Canada'), } options = ( @@ -1408,6 +1409,23 @@ if __name__ == '__main__': # tests {{{ ), ] # }}} + ca_tests = [ # {{{ + ( # Paperback with series + {'identifiers':{'isbn':'9781623808747'}}, + [title_test('Parting Shot', exact=True), authors_test(['Mary Calmes'])] + ), + ( # # in title + {'title':'Expert C# 2008 Business Objects', + 'authors':['Lhotka']}, + [title_test('Expert C# 2008 Business Objects'), authors_test(['Rockford Lhotka'])] + ), + ( # noscript description + {'identifiers':{'amazon_ca':'162380874X'}}, + [title_test('Parting Shot', exact=True), authors_test(['Mary Calmes']) + ] + ), + ] # }}} + def do_test(domain, start=0, stop=None): tests = globals().get(domain+'_tests') if stop is None: @@ -1416,8 +1434,8 @@ if __name__ == '__main__': # tests {{{ test_identify_plugin(Amazon.name, tests, modify_plugin=lambda p:(setattr(p, 'testing_domain', domain), setattr(p, 'touched_fields', p.touched_fields - {'tags'}))) - do_test('com') - + #do_test('com') + do_test('ca') # do_test('de') # }}}