Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_win32net.py 654B

1 year ago
123456789101112131415161718192021222324
  1. import unittest
  2. import win32net
  3. import win32netcon
  4. class TestCase(unittest.TestCase):
  5. def testGroupsGoodResume(self, server=None):
  6. res = 0
  7. level = 0 # setting it to 1 will provide more detailed info
  8. while True:
  9. (user_list, total, res) = win32net.NetGroupEnum(server, level, res)
  10. for i in user_list:
  11. pass
  12. if not res:
  13. break
  14. def testGroupsBadResume(self, server=None):
  15. res = 1 # Can't pass this first time round.
  16. self.assertRaises(win32net.error, win32net.NetGroupEnum, server, 0, res)
  17. if __name__ == "__main__":
  18. unittest.main()