Example #1
0
def test_uuid_to_string_base_64_and_back():
    random_uuid = uuid.uuid4()
    s3 = idm.uuid2slug(str(random_uuid))
    u3 = idm.slug2uuid(s3)
    random_uuid_copy = uuid.UUID(u3)
    assert random_uuid == random_uuid_copy
Example #2
0
def test_uuid_base64():
    slug4 = idm.uuid_base64()
    u4 = idm.slug2uuid(slug4)
    # Check that equivalent UUID is valid by converting string
    valid_uuid = uuid.UUID(u4)
Example #3
0
def test_base_64_string_to_uuid_string():
    s2 = 'NmYDAlxwRjeQh1FXo4y5NA'
    u2 = idm.slug2uuid(s2)
    assert u2 == '36660302-5c70-4637-9087-5157a38cb934'