예제 #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))
예제 #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))
예제 #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))
예제 #4
0
 def test_get_id_string(self):
     id = short_id.get_id('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual('ceirceirceir', id)
예제 #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))
예제 #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))
예제 #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))
예제 #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))
예제 #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))
예제 #10
0
 def test_get_id_string(self):
     id = short_id.get_id('11111111-1111-4111-bfff-ffffffffffff')
     self.assertEqual('ceirceirceir', id)