def test_post_add_file_daily(): app = Flask(__name__) configure_routes(app) response = app.test_client().post( '/addfile', data={"file": (BytesIO(b'content'), "06-05-2020.csv")}) # check for redirect assert response.status_code == 302
def test_post_add_file_time_series(): app = Flask(__name__) configure_routes(app) response = app.test_client().post( '/addfile', data={ "file": (BytesIO(b'content'), "time_series_covid19_confirmed_global.csv") }) # check for redirect assert response.status_code == 302
def test_get_return_time_series_data(): app = Flask(__name__) configure_routes(app) response = app.test_client().get('/return-time-series-data') assert response.status_code == 403
def test_filter_time_series(): app = Flask(__name__) configure_routes(app) response = app.test_client().get('/filter-time-series') assert response.status_code == 200
def test_filter_daily(): app = Flask(__name__) configure_routes(app) response = app.test_client().get('/filter-daily') assert response.status_code == 200
def test_get_add_file(): app = Flask(__name__) configure_routes(app) response = app.test_client().get('/addfile') assert response.status_code == 403
def test_post_no_file_sent(): app = Flask(__name__) configure_routes(app) response = app.test_client().post('/addfile') # check for redirect assert response.status_code == 302
def test_monitor(): app = Flask(__name__) configure_routes(app) response = app.test_client().get('/') assert response.status_code == 200