Skip to content

Commit

Permalink
enforce the existance of mimetype reference for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
caronc committed Jun 2, 2024
1 parent 409fa6b commit 2252581
Show file tree
Hide file tree
Showing 2 changed files with 2,274 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import os

import pytest
import mimetypes

from apprise import NotificationManager
from apprise import ConfigurationManager
Expand All @@ -44,6 +45,15 @@
# Grant access to our Attachment Manager Singleton
A_MGR = AttachmentManager()

@pytest.fixture(scope="function", autouse=True)
def mimetypes_always_available(session_mocker):
"""
A pytest session fixture which ensures mimetypes is set correctly
pointing to our temporary mime.types file
"""
files = (os.path.join(os.path.dirname(__file__), 'var', 'mime.types'), )
mimetypes.init(files=files)


@pytest.fixture(scope="function", autouse=True)
def no_throttling_everywhere(session_mocker):
Expand Down
Loading

0 comments on commit 2252581

Please sign in to comment.