Cleanup front-end build and python module contents (#1350)

* cleanup build and module contents

* lint

* update chalk

* more cleanup

* fix unit test
This commit is contained in:
Bruce Martin
2020-04-06 19:04:06 -07:00
committed by GitHub
parent 4efabf5231
commit 6193ae4997
9 changed files with 4509 additions and 935 deletions
+1 -9
View File
@@ -1,9 +1,8 @@
import os
import datetime
import logging
from flask import Flask, redirect, current_app, make_response, render_template, abort
from flask import Blueprint, request, send_from_directory
from flask import Blueprint, request
from flask_restful import Api, Resource
from http import HTTPStatus
@@ -76,13 +75,6 @@ def dataset_index(dataset=None):
)
# TODO: remove the top-level /favicon route once the build problem with index.html is resolved
@webbp.route("/favicon.png", methods=["GET"])
@webbp.route("/static/img/favicon.png", methods=["GET"])
def favicon():
return send_from_directory(os.path.join(webbp.root_path, "static/img/"), "favicon.png")
@webbp.route("/health", methods=["GET"])
@cache_control_always(no_store=True)
def health():
+1 -1
View File
@@ -237,7 +237,7 @@ class EndPoints(object):
def test_static(self):
endpoint = "static"
file = "js/service-worker.js"
file = "assets/favicon.ico"
url = f"{self.LOCAL_URL}{endpoint}/{file}"
result = self.session.get(url)
self.assertEqual(result.status_code, HTTPStatus.OK)