mirror of
https://github.com/Leseratte10/acsm-calibre-plugin
synced 2024-12-25 09:58:30 +01:00
Update tests
This commit is contained in:
parent
91a0154d23
commit
93d732f0d6
3 changed files with 8 additions and 8 deletions
|
@ -5,12 +5,12 @@ It is a full Python reimplementation of libgourou by Grégory Soutadé (http://i
|
|||
extended by more and more features.
|
||||
|
||||
<details>
|
||||
<summary>ACSM Input Plugin for Calibre - Copyright (c) 2021-2022 Leseratte10</summary>
|
||||
<summary>ACSM Input Plugin for Calibre - Copyright (c) 2021-2023 Leseratte10</summary>
|
||||
|
||||
```
|
||||
ACSM Input Plugin for Calibre / acsm-calibre-plugin
|
||||
Formerly known as "DeACSM"
|
||||
Copyright (c) 2021-2022 Leseratte10
|
||||
Copyright (c) 2021-2023 Leseratte10
|
||||
|
||||
This software is based on a Python reimplementation of the C++ library
|
||||
"libgourou" by Grégory Soutadé which is under the LGPLv3 or later
|
||||
|
|
|
@ -486,7 +486,6 @@ class ACSMInput(FileTypePlugin):
|
|||
self.unblock()
|
||||
return path_to_ebook
|
||||
|
||||
# That's an ACSM.
|
||||
# We would fulfill this now, but first perform some sanity checks ...
|
||||
|
||||
if not self.ADE_sanity_check():
|
||||
|
|
|
@ -120,13 +120,14 @@ class TestAdobe(unittest.TestCase):
|
|||
|
||||
|
||||
|
||||
@freeze_time("2031-07-19 22:15:22.074860")
|
||||
def test_verifyNonceCalculationFuture(self):
|
||||
'''Check if the nonce calculation is still correct in the future'''
|
||||
|
||||
@freeze_time("2038-04-27 03:34:32.543157")
|
||||
def test_verifyNonceCalculationYk38(self):
|
||||
'''Check if the nonce calculation works after 2038'''
|
||||
|
||||
nonce_return = libadobe.addNonce()
|
||||
expected_return = "<adept:nonce>2lQTp046AAAAAAAA</adept:nonce><adept:expiration>2031-07-19T22:25:22Z</adept:expiration>"
|
||||
self.assertEqual(nonce_return, expected_return, "Invalid nonce calculation in 2031")
|
||||
expected_return = "<adept:nonce>X0fGZ4A6AAAAAAAA</adept:nonce><adept:expiration>2038-04-27T03:44:32Z</adept:expiration>"
|
||||
self.assertEqual(nonce_return, expected_return, "Invalid nonce calculation in 2038, 2k38 problem")
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue