• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /macosx-10.10/pyobjc-45/pyobjc/pyobjc-framework-SystemConfiguration-2.5.1/PyObjCTest/
1from PyObjCTools.TestSupport import *
2from SystemConfiguration import *
3
4class TestSCPreferencesSetSpecific (TestCase):
5    def testFunctions(self):
6        ref = SCPreferencesCreate(None, "pyobjc.test", "pyobjc.test")
7        self.assertIsInstance(ref, SCPreferencesRef)
8
9        v = SCPreferencesSetComputerName(ref, "my host", kCFStringEncodingUTF8)
10        self.assertTrue(isinstance(v, bool))
11
12        v = SCPreferencesSetLocalHostName(ref, "my.host.private")
13        self.assertTrue(isinstance(v, bool))
14
15        # NOTE: Do not commit changes, that would mess with the computer running
16        # the tests
17
18
19if __name__ == "__main__":
20    main()
21