diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-01-07 11:41:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 11:41:28 +0000 |
commit | 8d3d264052adffaf9ef36a6d9235aeeb8bef5fb5 (patch) | |
tree | 3383923f7df6ea3f5cce37eca113258350309379 /tests/rest/media | |
parent | Handle updating schema version without any deltas. (#9033) (diff) | |
download | synapse-8d3d264052adffaf9ef36a6d9235aeeb8bef5fb5.tar.xz |
Skip unit tests which require optional dependencies (#9031)
If we are lacking an optional dependency, skip the tests that rely on it.
Diffstat (limited to 'tests/rest/media')
-rw-r--r-- | tests/rest/media/v1/test_url_preview.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/rest/media/v1/test_url_preview.py b/tests/rest/media/v1/test_url_preview.py index 83d728b4a4..6968502433 100644 --- a/tests/rest/media/v1/test_url_preview.py +++ b/tests/rest/media/v1/test_url_preview.py @@ -26,8 +26,15 @@ from twisted.test.proto_helpers import AccumulatingProtocol from tests import unittest from tests.server import FakeTransport +try: + import lxml +except ImportError: + lxml = None + class URLPreviewTests(unittest.HomeserverTestCase): + if not lxml: + skip = "url preview feature requires lxml" hijack_auth = True user_id = "@test:user" |