@@ -374,14 +374,14 @@ def test_log_tabular_success(ldi_resources, capsys, caplog):
374
374
assert 'Aggregating edit history for Grafana dashboard "ioUrPwQiz"' in caplog .text
375
375
376
376
reference = """
377
- | Notes: n/a<br/> [Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin<br/>Date: xxxx-xx-xxTxx:xx:xxZ |
377
+ [Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin<br/>Date: xxxx-xx-xxTxx:xx:xxZ |
378
378
""" .strip () # noqa: E501
379
379
380
380
first_item_raw = str .splitlines (captured .out )[- 1 ]
381
381
first_item_normalized = re .sub ( # noqa: B034
382
- "(.*)Date: .+|(.*)" , r"\1Date: xxxx-xx-xxTxx:xx:xxZ |\2" , first_item_raw , 1
382
+ "(.*)Date: .+|(.*)" , r"\1Date: xxxx-xx-xxTxx:xx:xxZ |\2" , first_item_raw , count = 1
383
383
)
384
- assert first_item_normalized == reference
384
+ assert reference in first_item_normalized
385
385
386
386
387
387
def test_log_yaml_success (ldi_resources , capsys , caplog ):
@@ -610,7 +610,9 @@ def test_explore_dashboards_empty_annotations(
610
610
assert len (data ) == 1
611
611
dashboard = data [0 ]
612
612
assert dashboard ["dashboard" ]["title" ] == "foo"
613
- if version .parse (grafana_version ) >= version .parse ("10.4" ):
613
+ if version .parse (grafana_version ) >= version .parse ("12" ):
614
+ assert len (dashboard ["dashboard" ]["uid" ]) == 36
615
+ elif version .parse (grafana_version ) >= version .parse ("10.4" ):
614
616
assert len (dashboard ["dashboard" ]["uid" ]) == 14
615
617
elif version .parse (grafana_version ) >= version .parse ("9.5" ):
616
618
assert len (dashboard ["dashboard" ]["uid" ]) == 36
0 commit comments