Skip to content

Commit e1b2b3e

Browse files
committed
Fix test
1 parent 1484b14 commit e1b2b3e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,6 @@ def test_get_reconnects_on_loop_change(mocked_create_connection, conn_handler):
332332
assert ret_val is fresh_conn
333333
assert conn_handler._storage["default"] is fresh_conn
334334
mocked_create_connection.assert_called_once_with("default")
335-
assert len(w) == 1
336-
assert issubclass(w[0].category, TortoiseLoopSwitchWarning)
337-
assert "different event loop" in str(w[0].message)
335+
loop_warnings = [x for x in w if issubclass(x.category, TortoiseLoopSwitchWarning)]
336+
assert len(loop_warnings) == 1
337+
assert "different event loop" in str(loop_warnings[0].message)

0 commit comments

Comments
 (0)