mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Merge pull request #2811 from alphagov/request-time-monitoring
Add GDSMetrics package
This commit is contained in:
@@ -6,7 +6,11 @@ def test_all_routes_have_authentication(client):
|
||||
blueprint_names = set(client.application.blueprints.keys())
|
||||
assert blueprint_names == before_req_funcs
|
||||
|
||||
routes_blueprint_names = set([x.split('.')[0] for x in client.application.view_functions.keys()])
|
||||
|
||||
# The static route is always available by default for a Flask app to serve anything in the static folder.
|
||||
routes_blueprint_names = set(
|
||||
[x.split('.')[0] for x in client.application.view_functions.keys() if x.split('.')[0] != 'static'])
|
||||
routes_blueprint_names.remove('static')
|
||||
|
||||
# The metrics route is not protected by auth as it's available to be scraped by Prometheus
|
||||
routes_blueprint_names.remove('metrics')
|
||||
assert sorted(blueprint_names) == sorted(routes_blueprint_names)
|
||||
|
||||
Reference in New Issue
Block a user