From fdf878d2e39db131da9f29c36452266c8ac2d908 Mon Sep 17 00:00:00 2001 From: Christian Groschupp Date: Thu, 27 Mar 2025 12:11:49 +0100 Subject: [PATCH] fix: ignore some type checks in test file --- tests/test_cleanmedia.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_cleanmedia.py b/tests/test_cleanmedia.py index f31b449..0089033 100644 --- a/tests/test_cleanmedia.py +++ b/tests/test_cleanmedia.py @@ -129,8 +129,8 @@ def test_file_delete(media_repo: MediaRepository, mock_db_conn: Tuple[Any, Any]) assert file.delete() is True assert not file_path.exists() - media_repo._execute.assert_any_call("DELETE from mediaapi_thumbnail WHERE media_id=%s;", ("mxid123",)) - media_repo._execute.assert_any_call("DELETE from mediaapi_media_repository WHERE media_id=%s;", ("mxid123",)) + media_repo._execute.assert_any_call("DELETE from mediaapi_thumbnail WHERE media_id=%s;", ("mxid123",)) # type: ignore + media_repo._execute.assert_any_call("DELETE from mediaapi_media_repository WHERE media_id=%s;", ("mxid123",)) # type: ignore def test_get_single_media(media_repo: MediaRepository, mock_db_conn: Tuple[Any, Any]) -> None: @@ -143,7 +143,7 @@ def test_get_single_media(media_repo: MediaRepository, mock_db_conn: Tuple[Any, assert file.media_id == "mxid123" assert file.base64hash == "abc123" - media_repo._execute.assert_called_with( + media_repo._execute.assert_called_with( # type: ignore "SELECT media_id, creation_ts, base64hash, file_size_bytes from mediaapi_media_repository WHERE media_id = %s;", ("mxid123",), ) @@ -278,7 +278,7 @@ def test_get_local_user_media(media_repo: MediaRepository, mock_db_conn: Tuple[A assert files[0].media_id == "media1" assert files[1].media_id == "media2" - media_repo._execute.assert_called_with( + media_repo._execute.assert_called_with( # type: ignore "SELECT media_id, creation_ts, base64hash, file_size_bytes FROM mediaapi_media_repository WHERE user_id = %s;", ("@user:domain.com",), ) @@ -407,7 +407,7 @@ def test_file_has_thumbnails(media_repo: MediaRepository, mock_db_conn: Tuple[An file = File(media_repo, "mxid123", 1600000000, "abc123", 1000) assert file.has_thumbnail() == 3 # noqa PLR2004 - media_repo._execute.assert_called_with( + media_repo._execute.assert_called_with( # type: ignore "SELECT COUNT(media_id) FROM mediaapi_thumbnail WHERE media_id = %s;", ("mxid123",), )