diff options
| author | Cody Logan <clpo13@gmail.com> | 2020-01-08 09:23:46 -0800 |
|---|---|---|
| committer | Cody Logan <clpo13@gmail.com> | 2020-01-08 09:23:46 -0800 |
| commit | d964e7fc6a644196993121f98f09bc66cd0e181d (patch) | |
| tree | 001cbae71010aa542bb9149cec06f84b9e4337c1 /tests/test_alphanum.py | |
| parent | f97fefad37d65dece3fc8047e8d7ea874ec26906 (diff) | |
| download | alphanum-d964e7fc6a644196993121f98f09bc66cd0e181d.tar.gz alphanum-d964e7fc6a644196993121f98f09bc66cd0e181d.zip | |
Add secure generate function
Diffstat (limited to 'tests/test_alphanum.py')
| -rw-r--r-- | tests/test_alphanum.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_alphanum.py b/tests/test_alphanum.py index fc9bc41..d567bdb 100644 --- a/tests/test_alphanum.py +++ b/tests/test_alphanum.py @@ -15,3 +15,19 @@ def test_subsequent_strings_differ(): foo = alphanum.generate(10) bar = alphanum.generate(10) assert foo != bar + + +def test_secure_no_string_length(): + foo = alphanum.generate_s() + assert len(foo) == 1 + + +def test_secure_with_string_length(): + foo = alphanum.generate_s(10) + assert len(foo) == 10 + + +def test_secure_subsequent_strings_differ(): + foo = alphanum.generate_s(10) + bar = alphanum.generate_s(10) + assert foo != bar |
