Beispiel #1
0
 def test_createKey_internetarchive(self, testRecord):
     testRecord['url'] = 'archive.org/services/img/test00test'
     testRecord['identifier'] = 'ia.test00test'
     testParser = CoverParse(testRecord)
     testKey = testParser.createKey()
     assert testKey == 'testing/ia.test00test_ia.test00test.jpg'
Beispiel #2
0
 def test_createKey(self, testRecord):
     testParser = CoverParse(testRecord)
     testKey = testParser.createKey()
     assert testKey == 'testing/xxxxxx_123.epub'
Beispiel #3
0
 def test_createKey_hathi(self, testRecord):
     testRecord[
         'url'] = 'hathitrust.org/pageview/test.123456/1?format=jpeg&v=2'  # noqa: E501
     testParser = CoverParse(testRecord)
     testKey = testParser.createKey()
     assert testKey == 'testing/xxxxxx_test.123456.jpg'