MCPcopy Index your code
hub / github.com/StackStorm/st2 / test_env

Method test_env

st2client/tests/unit/test_client.py:119–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117 )
118
119 def test_env(self):
120 base_url = "http://www.stackstorm.com"
121 api_url = "http://www.st2.com:9101/v1"
122 stream_url = "http://www.st2.com:9102/v1"
123
124 os.environ["ST2_BASE_URL"] = base_url
125 os.environ["ST2_API_URL"] = api_url
126 os.environ["ST2_STREAM_URL"] = stream_url
127 self.assertEqual(os.environ.get("ST2_BASE_URL"), base_url)
128 self.assertEqual(os.environ.get("ST2_API_URL"), api_url)
129 self.assertEqual(os.environ.get("ST2_STREAM_URL"), stream_url)
130
131 client = Client()
132 endpoints = client.endpoints
133 self.assertEqual(endpoints["base"], base_url)
134 self.assertEqual(endpoints["api"], api_url)
135 self.assertEqual(endpoints["stream"], stream_url)
136
137 def test_env_base_only(self):
138 base_url = "http://www.stackstorm.com"

Callers

nothing calls this directly

Calls 2

ClientClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected