buildframework/helium/sf/python/pythoncore/lib/pythoncorecpythontests/test_ccm.py
equal
deleted
inserted
replaced
19 |
19 |
20 """ Test cases for ccm python toolkit. |
20 """ Test cases for ccm python toolkit. |
21 |
21 |
22 """ |
22 """ |
23 |
23 |
24 # pylint: disable-msg=E1101 |
24 # pylint: disable=E1101 |
25 |
25 |
26 import logging |
26 import logging |
27 import os |
27 import os |
28 import sys |
28 import sys |
29 import mocker |
29 import mocker |
36 class CcmTest(mocker.MockerTestCase): |
36 class CcmTest(mocker.MockerTestCase): |
37 """ Tests the ccm module using mocker to prevent accessing a real Synergy database. """ |
37 """ Tests the ccm module using mocker to prevent accessing a real Synergy database. """ |
38 |
38 |
39 def test_running_sessions(self): |
39 def test_running_sessions(self): |
40 """ Running sessions can be checked. """ |
40 """ Running sessions can be checked. """ |
41 obj = self.mocker.replace(ccm._execute) |
41 obj = self.mocker.replace(ccm.execute) |
42 if sys.platform == "win32": |
42 if sys.platform == "win32": |
43 obj('c:\\apps\\ccm65\\bin\\ccm.exe status') |
43 obj('c:\\apps\\ccm65\\bin\\ccm.exe status') |
44 else: |
44 else: |
45 site_id = 'fa_nmp' |
45 site_id = 'fa_nmp' |
46 if 'SITE_ID' in os.environ: |
46 if 'SITE_ID' in os.environ: |