From c77d4fc27a7235f206e2ae771c47a57d6cc18df4 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Tue, 7 Jan 2020 16:28:01 -0800 Subject: Initial commit --- tests/__init__.py | 0 tests/test_alphanum.py | 17 +++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/__init__.py create mode 100644 tests/test_alphanum.py (limited to 'tests') diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_alphanum.py b/tests/test_alphanum.py new file mode 100644 index 0000000..fc9bc41 --- /dev/null +++ b/tests/test_alphanum.py @@ -0,0 +1,17 @@ +import alphanum + + +def test_no_string_length(): + foo = alphanum.generate() + assert len(foo) == 1 + + +def test_with_string_length(): + foo = alphanum.generate(10) + assert len(foo) == 10 + + +def test_subsequent_strings_differ(): + foo = alphanum.generate(10) + bar = alphanum.generate(10) + assert foo != bar -- cgit v1.2.3