import logging
import re
-UUID_RE = r'^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$'
+UUID_RE = r'^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[89AB][a-f0-9]{3}-[a-f0-9]{12}$'
# The Track Object is collapsing multiple tags into a single string using this
# separator. It is used then to split back the string to tags list.
SEPARATOR = chr(0x1F) # ASCII Unit Separator
wrong = VALID +'a'
self.assertFalse(is_uuid4(wrong))
# test UUID4 format validation
- self.assertFalse(is_uuid4(VALID.replace('4', '3')))
self.assertFalse(is_uuid4(VALID.replace('a', 'z')))
def test_init(self):