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.
 
 
 
 

25 lines
679 B

# -*- coding: utf-8 -*-
"""
:author: Grey Li (李辉)
:url: http://greyli.com
:copyright: © 2018 Grey Li <withlihui@gmail.com>
:license: MIT, see LICENSE for more details.
"""
from flask import current_app
from tests.base import BaseTestCase
class BasicTestCase(BaseTestCase):
def test_app_exist(self):
self.assertFalse(current_app is None)
def test_app_is_testing(self):
self.assertTrue(current_app.config['TESTING'])
def test_404_error(self):
response = self.client.get('/foo')
data = response.get_data(as_text=True)
self.assertEqual(response.status_code, 404)
self.assertIn('404 Error', data)