1 from test
import test_support
5 class NisTests(unittest
.TestCase
):
10 # NIS is probably not active, so this test isn't useful
11 if test_support
.verbose
:
12 print "Test Skipped:", msg
13 # Can't raise TestSkipped as regrtest only recognizes the exception
17 # On some systems, this map is only accessible to the
19 maps
.remove("passwd.adjunct.byname")
25 mapping
= nis
.cat(nismap
)
26 for k
, v
in mapping
.items():
29 if nis
.match(k
, nismap
) != v
:
30 self
.fail("NIS match failed for key `%s' in map `%s'" % (k
, nismap
))
32 # just test the one key, otherwise this test could take a
40 test_support
.run_unittest(NisTests
)
42 if __name__
== '__main__':