def setup_class(cls): """ Setup for this test case""" # Create the test client cls.client = app.test_client() cls.payload = {'name': 'Harry', 'tags': [1, 2]}
def test_flask_view(): """ Test that non Protean views work as before """ # Create the test client client = app.test_client() rv = client.get('/flask-view') assert rv.status_code == 200 assert rv.data == b'View Response' rv = client.get('/flask-view/abc') assert rv.status_code == 404
def client(self): """ Setup client for test cases """ yield app.test_client()
def setup_class(cls): """ Setup for this test case""" # Create the test client cls.client = app.test_client()