def testSetValidation(self):
    k = 'foo'
    v = 'arg'

    validation_type = self.settings._VALIDATION_TYPES[0] + 'junk'
    self.assertFalse(validation_type in self.settings._VALIDATION_TYPES)
    self.assertRaises(
        ValueError,
        self.settings._SetValidation, validation_type, 'junk')

    validation_type = self.settings._VALIDATION_TYPES[0]
    self.settings._SetValidation(k, validation_type, v)
    self.assertEqual(
        self.settings._validation,
        {k: { validation_type: (v,) }})
Test SetValidation().
dataset/ETHPy150Open google/simian/src/tests/simian/settings_test.py/BaseSettingsTest.testSetValidation