Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jkfran committed Oct 6, 2021
1 parent 424a791 commit 56ef540
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion canonicalwebteam/flask_base/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
prepare_redirects,
)

STATUS_CHECK = os.getenv("TALISKER_REVISION_ID", "OK")


def set_security_headers(response):
add_xframe_options_header = True
Expand Down Expand Up @@ -208,7 +210,7 @@ def internal_error(error):
# Default routes
@self.route("/_status/check")
def status_check():
return os.getenv("TALISKER_REVISION_ID", "OK")
return STATUS_CHECK

favicon_path = os.path.join(self.root_path, "../static", "favicon.ico")
if os.path.isfile(favicon_path):
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="canonicalwebteam.flask-base",
version="0.9.0",
version="0.9.1",
description=(
"Flask extension that applies common configurations"
"to all of webteam's flask apps."
Expand All @@ -22,9 +22,9 @@
install_requires=[
"canonicalwebteam.yaml-responses[flask] (>=1,<2)",
"flask (>=1,<2)",
"gevent==20.6.2",
"greenlet==0.4.16",
"talisker[gunicorn,gevent,flask,prometheus,raven] (>=0.18)",
"gevent==21.8.0",
"greenlet==1.1.2",
"talisker[gunicorn,gevent,flask,prometheus,raven]==0.19.0",
"Werkzeug (>=0.15,<0.16)",
],
dependency_links=[],
Expand Down
3 changes: 1 addition & 2 deletions tests/test_flask_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@ def test_cache_override(self):

def test_status_endpoints(self):
with create_test_app().test_client() as client:
os.environ["TALISKER_REVISION_ID"] = "a-build-id"
response = client.get("_status/check")
self.assertEqual(response.status_code, 200)
self.assertEqual(response.data.decode(), "a-build-id")
self.assertEqual(response.data.decode(), "OK")
self.assertEqual(response.headers.get("Cache-Control"), "no-store")

def test_redirects_deleted(self):
Expand Down

0 comments on commit 56ef540

Please sign in to comment.