Skip to content

Commit

Permalink
Checking incorrect patching: find_dart_source_samples_rows uses impor…
Browse files Browse the repository at this point in the history
…ted lighthouse.helpers.create_dart_connection; not the origial lighthouse.db.dart.create_dart_connection. Patching the original is not correct and has no effect in this test
  • Loading branch information
yoldas committed Mar 11, 2024
1 parent 7e74ae0 commit 2c27f10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/helpers/test_dart.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def test_find_dart_source_samples_rows_not_found_barcode(app, dart_samples):

def test_exceptions_are_propagated_up(app, dart_samples):
with app.app_context():
with patch("lighthouse.db.dart.create_dart_connection", side_effect=Exception()):
found = find_dart_source_samples_rows("unknown")
with patch("lighthouse.helpers.dart.create_dart_connection", side_effect=Exception()):
found = find_dart_source_samples_rows("unknown") # XXX: Raise exception here
with raises(Exception):
found = find_dart_source_samples_rows("unknown")
assert found is None

0 comments on commit 2c27f10

Please sign in to comment.