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