def test_is_list_of_dict_successes(self): self.assertTrue(is_list_of_dict([{}])) self.assertTrue(is_list_of_dict([{'a:': [1]}])) self.assertTrue(is_list_of_dict([{'a:': 'b'}]))
def test_is_list_of_dict_failures(self): self.assertFalse(is_list_of_dict(['a', 'b', 'c'])) self.assertFalse(is_list_of_dict([1, 2, 3])) self.assertFalse(is_list_of_dict(['a', {'b':'c'}])) self.assertFalse(is_list_of_dict([False])) self.assertFalse(is_list_of_dict([]))