示例#1
0
 def test_register_valid(self):
     self.assertTrue(registry.validate_uuid(registry.register_valid(
         registry.get_metadata('sample.txt'),
         uuid4(),
         'sample.txt',
         123,
         'validation query'
     )))
示例#2
0
 def test_register_invalid_multireason(self):
     self.assertTrue(registry.validate_uuid(
         registry.register_invalid(registry.get_metadata('sample.txt'), uuid4(), 'sample.txt',
                          {"datatypeMismatch": 3, "rowCountMismatch": 12}, 123, 'validation_query')))
示例#3
0
 def test_invalidate_uuid(self):
     self.assertEqual(registry.validate_uuid('qqqqqqqq-cafe-face-1234-123456789abc'), False, "valid uuid")
示例#4
0
 def test_register_raw(self):
     # self.assertTrue(validate_uuid(register_raw(get_metadata('sampleFile.txt'), 'sampleFile.txt', 'raw', 123)),
     #                 "Didn't get UUID")
     self.assertTrue(registry.validate_uuid(registry.register_raw(registry.get_metadata('household_power_consumption_50.txt.gz'),
                                                'household_power_consumption_50.txt.gz', 'raw', 123)),
                     "Didn't get UUID")
示例#5
0
 def test_validate_uuid(self):
     self.assertEqual(registry.validate_uuid('7e1a614c-9570-42a6-9bc7-315f2b6218be'), True, "not a valid uuid")