@@ 187-197 (lines=11) @@ | ||
184 | }) |
|
185 | self.assertEqual(rv.status_code, 200) |
|
186 | self.assertIn(b'ok', rv.data) |
|
187 | ||
188 | def test_42_get(self): |
|
189 | rv = self.app.get('/debug/test_project/get') |
|
190 | self.assertEqual(rv.status_code, 200) |
|
191 | data = json.loads(utils.text(rv.data)) |
|
192 | self.assertIn('script', data) |
|
193 | self.assertEqual(data['script'], self.script_content) |
|
194 | ||
195 | def test_45_run_with_saved_script(self): |
|
196 | rv = self.app.post('/debug/test_project/run', data={ |
|
197 | 'webdav_mode': 'true', |
|
198 | 'script': '', |
|
199 | 'task': self.task_content |
|
200 | }) |
|
@@ 133-142 (lines=10) @@ | ||
130 | self.assertIsNotNone(m) |
|
131 | self.assertIn('127.0.0.1:14887', m.group(1)) |
|
132 | self.__class__.script_content = json.loads(m.group(1)) |
|
133 | ||
134 | def test_30_run(self): |
|
135 | rv = self.app.post('/debug/test_project/run', data={ |
|
136 | 'script': self.script_content, |
|
137 | 'task': self.task_content |
|
138 | }) |
|
139 | self.assertEqual(rv.status_code, 200) |
|
140 | data = json.loads(utils.text(rv.data)) |
|
141 | self.assertIn(b'follows', rv.data) |
|
142 | self.assertGreater(len(data['follows']), 0) |
|
143 | self.__class__.task_content2 = data['follows'][0] |
|
144 | ||
145 | def test_32_run_bad_task(self): |