def testUnknownType(self):
    for cls in [str, int, bool]:
      try:
        outils.ContainerFromDicts(None, cls, NotImplemented)
      except __HOLE__, err:
        self.assertTrue(str(err).startswith("Unknown container type"))
      else:
        self.fail("Exception was not raised")

      try:
        outils.ContainerFromDicts(None, cls(), NotImplemented)
      except TypeError, err:
        self.assertTrue(str(err).endswith("is not a type"))
      else:
        self.fail("Exception was not raised")
dataset/ETHPy150Open ganeti/ganeti/test/py/ganeti.outils_unittest.py/TestContainerFromDicts.testUnknownType