def test_check_key_types(self): """Test check_key_types function.""" self.assertTrue(check_key_types({'name': 'intel', 'version': '2015a'}, [str])) self.assertTrue(check_key_types({'one': 1, 2: 'two'}, (int, str))) self.assertFalse(check_key_types({'name': 'intel', 'version': '2015a'}, [])) self.assertFalse(check_key_types({'name': 'intel', 'version': '2015a'}, (int,))) self.assertFalse(check_key_types({'one': 1, 2: 'two'}, [str]))
def test_check_key_types(self): """Test check_key_types function.""" self.assertTrue(check_key_types({'name': 'intel', 'version': '2015a'}, [str])) self.assertTrue(check_key_types({'one': 1, 2: 'two'}, (int, str))) self.assertFalse(check_key_types({'name': 'intel', 'version': '2015a'}, [])) self.assertFalse(check_key_types({'name': 'intel', 'version': '2015a'}, (int,))) self.assertFalse(check_key_types({'one': 1, 2: 'two'}, [str]))