def client(): my_app = create_app({ 'TESTING': True, # Set to True during testing. 'REPOSITORY': 'memory', # Set to 'memory' or 'database' depending on desired repository. 'TEST_DATA_PATH': TEST_DATA_PATH, # Path for loading test data into the repository. 'WTF_CSRF_ENABLED': False # test_client will not send a CSRF token, so disable validation. }) return my_app.test_client()
def client(): my_app = create_app({ 'TESTING': True, # Set to True during testing. 'TEST_MOVIE_FILE_PATH': TEST_MOVIE_FILE_PATH, # Path for loading test movie data into the repository. 'TEST_USER_FILE_PATH': TEST_USER_FILE_PATH, # Path for loading test user data into the repository. 'TEST_REVIEW_FILE_PATH': TEST_REVIEW_FILE_PATH, # Path for loading test review data into the repository. 'WTF_CSRF_ENABLED': False # test_client will not send a CSRF token, so disable validation. }) return my_app.test_client()
""" App entry point """ from movie_app import create_app app = create_app() if __name__ == "__main__": app.run(host='localhost', port=5000, threaded=False)