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)
示例#3
0
    def test_dictionary(self):
        error_messages = []
        d = {}

        configuration._validate_dictionary('dict', d, error_messages)

        self.assertEqual(len(error_messages), 0)
示例#4
0
    def test_dictionary_not_dict(self):
        error_messages = []
        d = ()

        configuration._validate_dictionary("dict", d, error_messages)

        self.assertEqual(len(error_messages), 1)
示例#5
0
    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)
示例#6
0
    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)