File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1717
1818
1919class TestAlgorithms (unittest .TestCase ):
20- def setUp (self ): # noqa
21- pass
22-
2320 def test_algorithm_should_throw_exception_if_prepare_key_not_impl (self ):
2421 algo = Algorithm ()
2522
Original file line number Diff line number Diff line change 1919import pytest
2020
2121from .compat import string_types , text_type , unittest
22- from .utils import ensure_bytes
22+ from .utils import ensure_bytes , utc_timestamp
2323
2424try :
2525 from cryptography .hazmat .backends import default_backend
3232 has_crypto = False
3333
3434
35- def utc_timestamp ():
36- return timegm (datetime .utcnow ().utctimetuple ())
37-
38-
3935class TestAPI (unittest .TestCase ):
4036
4137 def setUp (self ): # noqa
Original file line number Diff line number Diff line change 11import os
22
3+ from calendar import timegm
4+ from datetime import datetime
5+
36from .compat import text_type
47
58
@@ -17,6 +20,10 @@ def ensure_unicode(key):
1720 return key
1821
1922
23+ def utc_timestamp ():
24+ return timegm (datetime .utcnow ().utctimetuple ())
25+
26+
2027def key_path (key_name ):
2128 return os .path .join (os .path .dirname (os .path .realpath (__file__ )),
2229 'keys' , key_name )
You can’t perform that action at this time.
0 commit comments