def test_time_uuid_order(self): old = time_uuid.oid() for i in range(100): t = time_uuid.oid() print(t) assert t > old old = t
def __init__(self, **kwargs): self._id = kwargs.get('id', time_uuid.oid()) self._title = kwargs.get('title', '') self._message = kwargs.get('message', '') self._kind = kwargs.get('kind', self.NOTIFY) self._timestamp = kwargs.get('timestamp', datetime.now().isoformat()) self._priority = kwargs.get('priority', self.INFO) self._app_icon = None self._app_name = APP_NAME self._reply_to = None
def _gen_job_id(self): return time_uuid.oid()
def test_uuids_should_be_in_alaphabetical_order(self): old = time_uuid.oid() for i in range(100): t = time_uuid.oid() assert t > old old = t