Replace Mock/Meck with Mox
Mock/Meck work by redefining modules and modifying the global state, making it impossible to run tests that use them async. Mox requires an explicit contract/behaviour and allows for per-process mocking, like Tesla's mock.
Mock is used in at least these files:
test/pleroma/upload/filter/mogrify_test.exs
test/pleroma/upload/filter/mogrifun_test.exs
test/pleroma/workers/receiver_worker_test.exs
test/pleroma/user/backup_test.exs
test/pleroma/application_requirements_test.exs
test/pleroma/object/fetcher_test.exs
test/pleroma/user_relationship_test.exs
test/pleroma/web/activity_pub/relay_test.exs
test/pleroma/web/admin_api/controllers/media_proxy_cache_controller_test.exs
test/pleroma/web/activity_pub/side_effects_test.exs
test/pleroma/web/admin_api/controllers/user_controller_test.exs
test/pleroma/web/activity_pub/publisher_test.exs
test/pleroma/web/activity_pub/activity_pub_test.exs
test/pleroma/web/activity_pub/transmogrifier_test.exs
test/pleroma/web/activity_pub/mrf/media_proxy_warming_policy_test.exs
test/pleroma/web/activity_pub/transmogrifier/note_handling_test.exs
test/pleroma/web/activity_pub/transmogrifier/follow_handling_test.exs
test/pleroma/web/federator_test.exs
test/pleroma/activity/ir/topics_test.exs
test/pleroma/web/media_proxy/invalidation_test.exs
test/pleroma/web/twitter_api/util_controller_test.exs
test/pleroma/web/plugs/admin_secret_authentication_plug_test.exs
test/pleroma/web/plugs/plug_helper_test.exs
test/pleroma/web/plugs/http_signature_plug_test.exs
test/pleroma/web/plugs/o_auth_scopes_plug_test.exs
test/pleroma/web/media_proxy/media_proxy_controller_test.exs
test/pleroma/web/plugs/frontend_static_plug_test.exs
test/pleroma/web/o_auth/ldap_authorization_test.exs
test/pleroma/web/pleroma_api/controllers/emoji_file_controller_test.exs
test/pleroma/web/common_api_test.exs
test/pleroma/web/pleroma_api/controllers/user_import_controller_test.exs
test/pleroma/web/pleroma_api/controllers/emoji_pack_controller_test.exs
test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
test/pleroma/web/mastodon_api/controllers/filter_controller_test.exs
test/pleroma/web/mastodon_api/update_credentials_test.exs
test/pleroma/notification_test.exs
test/pleroma/signature_test.exs
test/pleroma/uploaders/s3_test.exs
test/mix/tasks/pleroma/uploads_test.exs
test/mix/tasks/pleroma/user_test.exs
Edited by lain