aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_uuid.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_uuid.py b/tests/test_uuid.py
new file mode 100644
index 0000000..6c37b17
--- /dev/null
+++ b/tests/test_uuid.py
@@ -0,0 +1,12 @@
+from edify.library import uuid
+
+uuids = {
+ "123e4567-e89b-12d3-a456-426614174000": True,
+ "123e456-789b-12d3-426614174000": False,
+ "123e456-789b-12d3-a456-426614174000-12ad3r": False,
+ "123e456": False,
+}
+
+def test_valid_uuids():
+ for uuid_string, expectation in uuids.items():
+ assert uuid(uuid_string) == expectation