Example #1
0
 def test_join_uuid_third_piece_too_short(self):
     with self.assertRaises(ValueError):
         join_uuid('7575a428aaf7', '4c2e929e', '1e2a0ab59e1')
Example #2
0
 def test_join_uuid_second_piece_too_long(self):
     with self.assertRaises(ValueError):
         join_uuid('7575a428aaf7', '4c2e929ea', '1e2a0ab59e16')
Example #3
0
 def test_join_uuid_valid(self):
     self.assertEquals(
         join_uuid('7575a428aaf7', '4c2e929e', '1e2a0ab59e16'),
         '7575a428-aaf7-4c2e-929e-1e2a0ab59e16')
Example #4
0
 def test_join_uuid_third_piece_too_short(self):
     with self.assertRaises(ValueError):
         join_uuid('7575a428aaf7', '4c2e929e', '1e2a0ab59e1')
Example #5
0
 def test_join_uuid_second_piece_too_long(self):
     with self.assertRaises(ValueError):
         join_uuid('7575a428aaf7', '4c2e929ea', '1e2a0ab59e16')
Example #6
0
 def test_join_uuid_valid(self):
     self.assertEquals(
         join_uuid('7575a428aaf7', '4c2e929e', '1e2a0ab59e16'),
         '7575a428-aaf7-4c2e-929e-1e2a0ab59e16'
     )