Exemple #1
0
    def test_creds(self):
        principal = heimdal.principal(self.context, USER)
        tkt_service = ""
        creds = heimdal.creds(self.context, principal, PASSWORD, tkt_service)

        (enctype, kvno, name, principal) = creds.parse()

        creds.change_password(PASSWORD)
	def test_creds(self):
		context = heimdal.context()
		principal = heimdal.principal(context, USER)
		tkt_service = ""

		before = middle = after = 0
		before = sys.gettotalrefcount()
		creds = heimdal.creds(context, principal, PASSWORD, tkt_service)
		middle = sys.gettotalrefcount()
		del creds
		after = sys.gettotalrefcount()

		self.assertGreater(middle, before)
		self.assertLess(after, middle)
		self.assertEqual(before, after)
	def test_store_cred(self):
		self.ccache.initialize(self.principal)
		tkt_service = ""
		creds = heimdal.creds(self.context, self.principal, PASSWORD, tkt_service)
		self.ccache.store_cred(creds)
	def setUp(self):
		context = heimdal.context()
		principal = heimdal.principal(context, USER)
		tkt_service = ""
		self.creds = heimdal.creds(self.context, principal, PASSWORD, tkt_service)