Example #1
0
 def test_get_id_uuid_endianness(self):
     source = uuid.UUID('ffffffff-00ff-4000-aaaa-aaaaaaaaaaaa')
     self.assertEqual('aaaa77777777', short_id.get_id(source))
Example #2
0
 def test_get_id_uuid_f(self):
     source = uuid.UUID('ffffffff-ffff-4fff-8000-000000000000')
     self.assertEqual('777777777777', short_id.get_id(source))
Example #3
0
 def test_get_id_uuid_0(self):
     source = uuid.UUID('00000000-0000-4000-bfff-ffffffffffff')
     self.assertEqual('aaaaaaaaaaaa', short_id.get_id(source))
Example #4
0
 def test_get_id_string(self):
     id = short_id.get_id('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual('ceirceirceir', id)
Example #5
0
 def test_get_id_uuid_1(self):
     source = uuid.UUID('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual(0x111111111111111, source.time)
     self.assertEqual('ceirceirceir', short_id.get_id(source))
Example #6
0
 def test_get_id_uuid_endianness(self):
     source = uuid.UUID('ffffffff-00ff-4000-aaaa-aaaaaaaaaaaa')
     self.assertEqual('aaaa77777777', short_id.get_id(source))
Example #7
0
 def test_get_id_uuid_0(self):
     source = uuid.UUID('00000000-0000-4000-bfff-ffffffffffff')
     self.assertEqual('aaaaaaaaaaaa', short_id.get_id(source))
Example #8
0
 def test_get_id_uuid_f(self):
     source = uuid.UUID('ffffffff-ffff-4fff-8000-000000000000')
     self.assertEqual('777777777777', short_id.get_id(source))
Example #9
0
 def test_get_id_uuid_1(self):
     source = uuid.UUID('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual(0x111111111111111, source.time)
     self.assertEqual('ceirceirceir', short_id.get_id(source))
Example #10
0
 def test_get_id_string(self):
     id = short_id.get_id('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual('ceirceirceir', id)