Skip to content

Commit

Permalink
import shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed May 17, 2024
1 parent d8a8940 commit 4e1cb7c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/rest/client/test_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
from tests.test_utils import SMALL_PNG
from tests.unittest import override_config

try:
import lxml
except ImportError:
lxml = None # type: ignore[assignment]


class UnstableMediaDomainBlockingTests(unittest.HomeserverTestCase):
remote_media_id = "doesnotmatter"
Expand Down Expand Up @@ -168,10 +163,14 @@ def test_remote_media_thumbnail_normally_unblocked(self) -> None:


class UnstableURLPreviewTests(unittest.HomeserverTestCase):
servlets = [media.register_servlets]
try:
import lxml
except ImportError:
lxml = None # type: ignore[assignment]
if not lxml:
skip = "url preview feature requires lxml"

servlets = [media.register_servlets]
hijack_auth = True
user_id = "@test:user"
end_content = (
Expand Down

0 comments on commit 4e1cb7c

Please sign in to comment.