(self)
| 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') |
nothing calls this directly
no test coverage detected