mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-12-22 09:19:55 +06:00
Update tests
This commit is contained in:
parent
91a0154d23
commit
93d732f0d6
@ -5,12 +5,12 @@ It is a full Python reimplementation of libgourou by Grégory Soutadé (http://i
|
|||||||
extended by more and more features.
|
extended by more and more features.
|
||||||
|
|
||||||
<details>
|
<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
|
ACSM Input Plugin for Calibre / acsm-calibre-plugin
|
||||||
Formerly known as "DeACSM"
|
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
|
This software is based on a Python reimplementation of the C++ library
|
||||||
"libgourou" by Grégory Soutadé which is under the LGPLv3 or later
|
"libgourou" by Grégory Soutadé which is under the LGPLv3 or later
|
||||||
|
@ -486,7 +486,6 @@ class ACSMInput(FileTypePlugin):
|
|||||||
self.unblock()
|
self.unblock()
|
||||||
return path_to_ebook
|
return path_to_ebook
|
||||||
|
|
||||||
# That's an ACSM.
|
|
||||||
# We would fulfill this now, but first perform some sanity checks ...
|
# We would fulfill this now, but first perform some sanity checks ...
|
||||||
|
|
||||||
if not self.ADE_sanity_check():
|
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):
|
@freeze_time("2038-04-27 03:34:32.543157")
|
||||||
'''Check if the nonce calculation is still correct in the future'''
|
def test_verifyNonceCalculationYk38(self):
|
||||||
|
'''Check if the nonce calculation works after 2038'''
|
||||||
|
|
||||||
nonce_return = libadobe.addNonce()
|
nonce_return = libadobe.addNonce()
|
||||||
expected_return = "<adept:nonce>2lQTp046AAAAAAAA</adept:nonce><adept:expiration>2031-07-19T22:25:22Z</adept:expiration>"
|
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 2031")
|
self.assertEqual(nonce_return, expected_return, "Invalid nonce calculation in 2038, 2k38 problem")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user