MCPcopy Create free account
hub / github.com/StackStorm/st2 / setUp

Method setUp

st2client/tests/unit/test_shell.py:583–600  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

581
582class CLITokenCachingTestCase(unittest.TestCase):
583 def setUp(self):
584 super(CLITokenCachingTestCase, self).setUp()
585 self._mock_temp_dir_path = tempfile.mkdtemp()
586 self._mock_config_directory_path = os.path.join(
587 self._mock_temp_dir_path, "testconfig"
588 )
589 self._mock_config_path = os.path.join(
590 self._mock_config_directory_path, "config"
591 )
592
593 os.makedirs(self._mock_config_directory_path)
594
595 self._p1 = mock.patch(
596 "st2client.base.ST2_CONFIG_DIRECTORY", self._mock_config_directory_path
597 )
598 self._p2 = mock.patch("st2client.base.ST2_CONFIG_PATH", self._mock_config_path)
599 self._p1.start()
600 self._p2.start()
601
602 def tearDown(self):
603 super(CLITokenCachingTestCase, self).tearDown()

Callers

nothing calls this directly

Calls 3

patchMethod · 0.80
setUpMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected