Esempio n. 1
0
def add_unique_id(logger_class, log_method, event):
    ''' Attach a unique id per event '''
    event['id'] = utils.generate_unique_id()
    return event
Esempio n. 2
0
def add_unique_id(logger_class, log_method, event):
    """ Attach a unique id per event """
    event["id"] = utils.generate_unique_id()
    return event
Esempio n. 3
0
 def test_id_generator_unicity(self):
     new_id = utils.generate_unique_id()
     for _ in range(self.random_length):
         old_id = new_id
         new_id = utils.generate_unique_id()
         self.assertTrue(new_id != old_id)
Esempio n. 4
0
 def test_id_generator(self):
     new_id = utils.generate_unique_id()
     self.assertTrue(isinstance(new_id, str))
     self.assertTrue(len(new_id) == 36)
Esempio n. 5
0
 def test_id_generator_unicity(self):
     new_id = utils.generate_unique_id()
     for _ in range(self.random_length):
         old_id = new_id
         new_id = utils.generate_unique_id()
         self.assertTrue(new_id != old_id)
Esempio n. 6
0
 def test_id_generator(self):
     new_id = utils.generate_unique_id()
     self.assertTrue(isinstance(new_id, str))
     self.assertTrue(len(new_id) == 36)