Cloud computing coursework:Saas 图片社交网站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 line
510 B

3 年之前
  1. # -*- coding: utf-8 -*-
  2. from flask import current_app
  3. from tests.base import BaseTestCase
  4. class BasicTestCase(BaseTestCase):
  5. def test_app_exist(self):
  6. self.assertFalse(current_app is None)
  7. def test_app_is_testing(self):
  8. self.assertTrue(current_app.config['TESTING'])
  9. def test_404_error(self):
  10. response = self.client.get('/foo')
  11. data = response.get_data(as_text=True)
  12. self.assertEqual(response.status_code, 404)
  13. self.assertIn('404 Error', data)