8
8
9
9
class TestUtil (unittest .TestCase ):
10
10
def test_import_util (self ):
11
- import passwordlib .util # noqa
11
+ # noinspection PyUnresolvedReferences
12
+ import passwordlib .core
12
13
13
14
def test_salt_generation (self ):
14
- from passwordlib .util import generate_salt
15
+ from passwordlib .core import generate_salt
15
16
self .assertIsInstance (generate_salt (), bytes )
16
17
self .assertEqual (len (generate_salt (length = 32 )), 32 )
17
18
self .assertEqual (len (generate_salt (length = 64 )), 64 )
18
19
19
20
def test_dumping (self ):
20
- from passwordlib .util import (
21
+ from passwordlib .core import (
21
22
dumps ,
22
23
get_algorithm , get_iterations , get_salt
23
24
)
@@ -31,7 +32,7 @@ def test_dumping(self):
31
32
self .assertIsInstance (dumped , bytes )
32
33
33
34
def test_loading (self ):
34
- from passwordlib .util import (
35
+ from passwordlib .core import (
35
36
dumps , loads ,
36
37
get_algorithm , get_iterations , get_salt
37
38
)
@@ -49,7 +50,7 @@ def test_loading(self):
49
50
self .assertEqual (loaded .hashed , hashed )
50
51
51
52
def test_redumping (self ):
52
- from passwordlib .util import (
53
+ from passwordlib .core import (
53
54
dumps , loads ,
54
55
get_algorithm , get_iterations , get_salt ,
55
56
)
@@ -67,7 +68,7 @@ def test_redumping(self):
67
68
self .assertEqual (dumped , dumped2 )
68
69
69
70
def test_extraction (self ):
70
- from passwordlib .util import (
71
+ from passwordlib .core import (
71
72
dumps ,
72
73
extract_algorythm , extract_iterations , extract_salt , extract_hashed ,
73
74
get_algorithm , get_iterations , get_salt ,
0 commit comments