From 2de01dbd7d402298870a8698607c08cf58199fed Mon Sep 17 00:00:00 2001 From: "Mark W. Eichin" Date: Fri, 10 Apr 2009 03:59:41 +0000 Subject: test ZExpandRealm --- lib/zephyr_tests.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/zephyr_tests.py') diff --git a/lib/zephyr_tests.py b/lib/zephyr_tests.py index f65918a..dcc275d 100755 --- a/lib/zephyr_tests.py +++ b/lib/zephyr_tests.py @@ -322,6 +322,7 @@ class libZephyr(object): "ZParseNotice", "ZFormatNotice", "ZCompareUID", + "ZExpandRealm", ] def __init__(self, library_path=None): """connect to the library and build the wrappers""" @@ -386,6 +387,14 @@ class libZephyr(object): POINTER(ZUnique_Id_t), # *uid2 ] + # char * + # ZExpandRealm(realm) + # char *realm; # mmm 80's + self.ZExpandRealm.restype = c_char_p + self.ZExpandRealm.argtypes = [ + c_char_p, # realm + ] + # library-specific setup... self.ZInitialize() @@ -454,6 +463,13 @@ class ZephyrTestSuite(TestSuite): assert not self._libzephyr.ZCompareUID(notice1.z_uid, notice2.z_uid), "distinct notices don't compare as distinct" # ctypes_pprint(notice1.z_uid) + def test_z_expand_realm(self): + """test ZExpandRealm""" + assert self._libzephyr.ZExpandRealm("") == "" + assert self._libzephyr.ZExpandRealm("localhost") == "" + assert self._libzephyr.ZExpandRealm("bitsy.mit.edu") == "ATHENA.MIT.EDU" + + if __name__ == "__main__": parser = optparse.OptionParser(usage=__doc__, version = "%%prog %s" % __version__) -- cgit v1.2.3