Socialify

Folder ..

Viewing test_uuid.py
13 lines (10 loc) • 343.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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