flask extension to make functional testing of flask applications with the app engine sdk easier.
install with pip:
pip install flask-funktional-gae==0.0.1
used on top of the flask-funktional
extension, it provides setup of app engine sdk stubs with a focus on being
transparent, seamless, and minimally invasive.
- [todo]
from flask.ext import funktional
from flask.ext import funktional_gae
# define a test Flask application..
app = Flask(__name__)
app.debug = True
app.request_class = funktional.FileUploadRequest
class TestCase(funktional.TestCase):
def test_upload_returns_valid_blob_result(self):
data, filename, size = funktional.open_test_file('test_file.jpg')
response = app.test_client().post(
data={'test': (data, filename)},
path='/test_upload1',
headers={},
query_string={})
self.assertEqual(200, response.status_code)