aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-11-27 12:12:37 -0500
committerBobby <[email protected]>2022-11-27 12:12:37 -0500
commit2076d462ed8c38a1202fd5ca5b20f0e07accbbee (patch)
treefd1143b1f69964193eed29e9ad84700060b34793 /tests
parentf5cb8a4d14c48f458039d608f6bd38bea13a881c (diff)
downloadedify-2076d462ed8c38a1202fd5ca5b20f0e07accbbee.tar.xz
edify-2076d462ed8c38a1202fd5ca5b20f0e07accbbee.zip
added uuid validator
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