MCPcopy Index your code
hub / github.com/bugy/script-server / test_get_script_code

Method test_get_script_code

src/tests/web/server_test.py:155–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153 self.assertEqual(start_response.content, b'3')
154
155 def test_get_script_code(self):
156 self.start_server(12345, '127.0.0.1')
157
158 script_path = test_utils.create_file('my_script.py')
159 test_utils.write_script_config({'name': 's1', 'script_path': script_path}, 's1', self.runners_folder)
160
161 response = self.request('get',
162 'http://127.0.0.1:12345/admin/scripts/s1/code',
163 self._admin_session
164 )
165
166 self.assertEqual({'code': 'test text', 'file_path': os.path.abspath(script_path)},
167 response)
168
169 def test_create_script_config(self):
170 self.start_server(12345, '127.0.0.1')

Callers

nothing calls this directly

Calls 2

start_serverMethod · 0.95
requestMethod · 0.95

Tested by

no test coverage detected