Example #1
0
 def setUp(self):
     app.config['TESTING'] = True
     app.testing = True  # required to check for exceptions
     self.client = app.test_client()
Example #2
0
 def test_crossdomain(self):
     with app.test_client() as client:
         res = client.get('/')
         nose.tools.assert_equals(res.status_code, 200)
Example #3
0
 def test_error(self):
      with app.test_client() as client:
         with nose.tools.assert_raises(ServiceNotFound) as not_found:
             res = client.get('/non-existent')
             nose.tools.assert_equal(not_found.code, 404)
Example #4
0
 def test_index_root(self):
     with app.test_client() as client:
         res = self.client.get('/', follow_redirects=True)
         nose.tools.assert_equals(res.status_code, 200)