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

Method test_env_base_only

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

Source from the content-addressed store, hash-verified

135 self.assertEqual(endpoints["stream"], stream_url)
136
137 def test_env_base_only(self):
138 base_url = "http://www.stackstorm.com"
139 api_url = "http://www.stackstorm.com:9101/v1"
140 stream_url = "http://www.stackstorm.com:9102/v1"
141
142 os.environ["ST2_BASE_URL"] = base_url
143 self.assertEqual(os.environ.get("ST2_BASE_URL"), base_url)
144 self.assertEqual(os.environ.get("ST2_API_URL"), None)
145 self.assertEqual(os.environ.get("ST2_STREAM_URL"), None)
146
147 client = Client()
148 endpoints = client.endpoints
149 self.assertEqual(endpoints["base"], base_url)
150 self.assertEqual(endpoints["api"], api_url)
151 self.assertEqual(endpoints["stream"], stream_url)
152
153 def test_args(self):
154 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