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