(self)
| 33 | app.get('/') |
| 34 | |
| 35 | def test_wrong_endpoint(self): |
| 36 | res = self.app.get('/wrong', status=404) |
| 37 | self.assertEqual(res.status_code, 404) |
| 38 | |
| 39 | body = res.json |
| 40 | self.assertEqual("Not found: '/wrong'", body['error']) |
| 41 | self.assertEqual(404, body['status_code']) |
| 42 | |
| 43 | def test_index_endpoint(self): |
| 44 | res = self.app.get('/') |