Skip to content
Snippets Groups Projects
Commit b91fa901 authored by Erik Reid's avatar Erik Reid
Browse files

don't use dict.default without default value

parent f3022dfd
No related branches found
No related tags found
No related merge requests found
......@@ -585,7 +585,7 @@ def provision(config):
dashboard = dashboard.result()
if dashboard is None:
continue
managed_dashboard_uids.add(dashboard.get('uid'))
managed_dashboard_uids.add(dashboard['uid'])
for uid in all_original_dashboard_uids - managed_dashboard_uids:
logger.info(f'Deleting stale dashboard with UID {uid}')
......
......@@ -653,7 +653,7 @@ def test_provision(data_config, mocker, client):
responses.add(
method=responses.POST,
url=f"http://{data_config['hostname']}/api/dashboards/db",
json={'id': 666})
json={'uid': '999', 'id': 666})
responses.add(
method=responses.PUT,
......@@ -726,7 +726,7 @@ def test_provision(data_config, mocker, client):
'brian_dashboard_manager.grafana.provision.create_dashboard')
# we dont care about this, just mark it created
# we dont care about this, tested separately
_mocked_create_dashboard.return_value = {'id': 666}
_mocked_create_dashboard.return_value = {'uid': '999', 'id': 666}
_mocked_delete_api_token = mocker.patch(
'brian_dashboard_manager.grafana.provision.delete_api_token')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment