def testWrongValueType(self): with self.assertRaises(TypeError): utils.AssertDictType({ "foo": 1, "bar": 2, "baz": 3.14 }, unicode, int)
def testNotADictIncorrect(self): with self.assertRaises(TypeError): utils.AssertDictType([(1, "foo"), (2, "bar"), (3, "baz")], int, unicode)
def testIntStringDictCorrect(self): del self # Unused. utils.AssertDictType({1: "foo", 2: "bar", 3: "baz"}, int, unicode)