def test_dictionary_none_ok(self): error_messages = [] d = None configuration._validate_dictionary('dict', d, error_messages, none_ok=True) self.assertEqual(len(error_messages), 0)
def test_dictionary(self): error_messages = [] d = {} configuration._validate_dictionary('dict', d, error_messages) self.assertEqual(len(error_messages), 0)
def test_dictionary_not_dict(self): error_messages = [] d = () configuration._validate_dictionary("dict", d, error_messages) self.assertEqual(len(error_messages), 1)
def test_dictionary_none_not_ok(self): error_messages = [] d = None configuration._validate_dictionary("dict", d, error_messages, none_ok=False) self.assertEqual(len(error_messages), 1)