Ejemplo n.º 1
0
 def test_guide(self):
     g = model.Guide('title 1', 'description 1')
     model.db.session.add(g)
     model.db.session.commit()
     tester = app.test_client()
     response = tester.get('/guide/%s' % g.id, content_type='html/text')
     self.assertEqual(response.status_code, 200)
     self.assertIn('title 1', response.data)
Ejemplo n.º 2
0
 def test_no_guide(self):
     tester = app.test_client()
     response = tester.get('/guide/000', content_type='html/text')
     self.assertEqual(response.status_code, 404)
Ejemplo n.º 3
0
 def test_index(self):
     tester = app.test_client()
     response = tester.get('/', content_type='html/text')
     self.assertEqual(response.status_code, 200)