Esempio n. 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'
     )))
Esempio n. 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')))
Esempio n. 3
0
 def test_invalidate_uuid(self):
     self.assertEqual(registry.validate_uuid('qqqqqqqq-cafe-face-1234-123456789abc'), False, "valid uuid")
Esempio n. 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")
Esempio n. 5
0
 def test_validate_uuid(self):
     self.assertEqual(registry.validate_uuid('7e1a614c-9570-42a6-9bc7-315f2b6218be'), True, "not a valid uuid")