@@ -233,7 +233,6 @@ def test_log_empty(docker_grafana, capsys, caplog):
233
233
234
234
235
235
def test_log_all (ldi_resources , capsys , caplog ):
236
-
237
236
# Only provision specific dashboard(s).
238
237
ldi_resources (dashboards = ["tests/grafana/dashboards/ldi-v27.json" , "tests/grafana/dashboards/ldi-v33.json" ])
239
238
@@ -244,7 +243,7 @@ def test_log_all(ldi_resources, capsys, caplog):
244
243
captured = capsys .readouterr ()
245
244
246
245
# Verify output.
247
- assert ' Aggregating edit history for multiple Grafana dashboards' in caplog .text
246
+ assert " Aggregating edit history for multiple Grafana dashboards" in caplog .text
248
247
history = json .loads (captured .out )
249
248
assert len (history ) == 3
250
249
@@ -324,13 +323,15 @@ def test_log_filter_sql(ldi_resources, capsys, caplog):
324
323
ldi_resources (dashboards = ["tests/grafana/dashboards/ldi-v27.json" , "tests/grafana/dashboards/ldi-v33.json" ])
325
324
326
325
# Run command and capture output.
327
- set_command ("""log --format=yaml --sql='
326
+ set_command (
327
+ """log --format=yaml --sql='
328
328
SELECT url
329
329
FROM dashboard_versions
330
330
GROUP BY uid, url
331
331
HAVING COUNT(version)=1
332
332
'
333
- """ )
333
+ """
334
+ )
334
335
with caplog .at_level (logging .DEBUG ):
335
336
grafana_wtf .commands .run ()
336
337
captured = capsys .readouterr ()
@@ -488,10 +489,12 @@ def test_explore_dashboards_data_details(ldi_resources, capsys, caplog):
488
489
assert dashboard .details .targets [0 ]._panel .type == "graph"
489
490
assert dashboard .details .targets [0 ]._panel .datasource .type == "influxdb"
490
491
assert dashboard .details .targets [0 ]._panel .datasource .uid == "PDF2762CDFF14A314"
491
- assert dashboard .details .targets [0 ].fields == [{'func' : 'mean' , 'name' : 'P1' }]
492
- assert dashboard .details .templating [0 ].query == \
493
- "SELECT osm_country_code AS __value, country_and_countrycode AS __text " \
494
- "FROM ldi_network ORDER BY osm_country_code"
492
+ assert dashboard .details .targets [0 ].fields == [{"func" : "mean" , "name" : "P1" }]
493
+ assert (
494
+ dashboard .details .templating [0 ].query
495
+ == "SELECT osm_country_code AS __value, country_and_countrycode AS __text "
496
+ "FROM ldi_network ORDER BY osm_country_code"
497
+ )
495
498
496
499
497
500
def test_explore_dashboards_empty_annotations (grafana_version , create_datasource , create_dashboard , capsys , caplog ):
0 commit comments