def test_post_data(self):
        with self.app.test_request_context():
            response = self.client.post(url_for('test'), data={
                'username': 'Foo',
            })
        self.assertEqual(302, response.status_code)
        self.assertEqual('http://google.com/', response.headers['Location'])
Test POST request with valid data.
dataset/ETHPy150Open brocaar/flask-views/flask_views/tests/functional/test_edit.py/FormViewTestCase.test_post_data