def test_type(self): with self.assertRaises(TypeError): heimdal.enctype(None, ENCSTR) with self.assertRaises(TypeError): heimdal.enctype("", ENCSTR) with self.assertRaises(TypeError): heimdal.enctype(object(), ENCSTR)
def test_enctype(self): context = heimdal.context() before = middle = after = 0 before = sys.gettotalrefcount() enctype = heimdal.enctype(context, ENCSTR) middle = sys.gettotalrefcount() del enctype after = sys.gettotalrefcount() self.assertGreater(middle, before) self.assertLess(after, middle) self.assertEqual(before, after)
def setUp(self): self.context = heimdal.context() self.enctype = heimdal.enctype(self.context, ENCSTR) self.principal = heimdal.principal(self.context, USER)
def setUp(self): context = heimdal.context() self.enctype = heimdal.enctype(context, ENCSTR)