at master 1.7 kB view raw
1diff --git a/tests/async_client_test.py b/tests/async_client_test.py 2index b0f7a5a..2494fc6 100644 3--- a/tests/async_client_test.py 4+++ b/tests/async_client_test.py 5@@ -140,7 +140,10 @@ from nio.api import ( 6 ThreadInclusion, 7 ) 8 from nio.client.async_client import connect_wrapper, on_request_chunk_sent 9-from nio.crypto import OlmDevice, Session, decrypt_attachment 10+try: 11+ from nio.crypto import OlmDevice, Session, decrypt_attachment 12+except ImportError: 13+ pass 14 from nio.responses import PublicRoom, PublicRoomsResponse 15 16 BASE_URL_V1 = f"https://example.org{MATRIX_API_PATH_V1}" 17diff --git a/tests/conftest.py b/tests/conftest.py 18index 0c67ee0..6b77e02 100644 19--- a/tests/conftest.py 20+++ b/tests/conftest.py 21@@ -10,11 +10,17 @@ from conftest_async import ( # noqa: F401 22 async_client_pair_same_user, 23 unauthed_async_client, 24 ) 25-from olm import Account 26+try: 27+ from olm import Account 28+except ImportError: 29+ pass 30 31 from nio import Client, ClientConfig, HttpClient 32-from nio.crypto import Olm, OlmDevice 33-from nio.store import SqliteMemoryStore 34+try: 35+ from nio.crypto import Olm, OlmDevice 36+ from nio.store import SqliteMemoryStore 37+except ImportError: 38+ pass 39 40 ALICE_ID = "@alice:example.org" 41 ALICE_DEVICE_ID = "JLAFKJWSCS" 42diff --git a/tests/helpers.py b/tests/helpers.py 43index 63445b6..05096d1 100644 44--- a/tests/helpers.py 45+++ b/tests/helpers.py 46@@ -26,8 +26,11 @@ from hyperframe.frame import ( 47 WindowUpdateFrame, 48 ) 49 50-from nio.crypto import OlmAccount, OlmDevice 51-from nio.store import Ed25519Key 52+try: 53+ from nio.crypto import OlmAccount, OlmDevice 54+ from nio.store import Ed25519Key 55+except ImportError: 56+ pass 57 58 SAMPLE_SETTINGS = { 59 SettingsFrame.HEADER_TABLE_SIZE: 4096,