def test_time_uuid(self): prev = time_uuid.utcnow() for i in xrange(1000): now = time_uuid.utcnow() #print(now.hex) self.assertTrue(now > prev) prev = now
def __init__(self, id=None, title='', text='', auto_start=False): if id is None: self._id = time_uuid.utcnow().hex else: self._id = id self._title = title self._text = text self._auto_start = auto_start
def __init__(self, id=None, name=None, started_time=None): if id is None: self._id = time_uuid.utcnow().hex else: self._id = id self._name = name self._started_time = started_time
def post(self, value): key = time_uuid.utcnow().hex if self._cursor.put(key, value): return key return None