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 bf0a25d
Show file tree
Hide file tree
Showing 2 changed files with 2,275 additions and 0 deletions.
11 changes: 11 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 @@ -45,6 +46,16 @@
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 bf0a25d

Please sign in to comment.