tests: Skip test that require tantivy.

This commit is contained in:
Damir Jelić 2019-07-12 15:38:04 +02:00
parent b7cc1d60f3
commit 1a8f28b90a
2 changed files with 11 additions and 2 deletions

View File

@ -19,6 +19,7 @@ from nio import (
from pantalaimon.client import PanClient
from pantalaimon.config import ServerConfig
from pantalaimon.store import PanStore
from pantalaimon.index import INDEXING_ENABLED
TEST_ROOM_ID = "!SVkFJHzfwvuaIEawgC:localhost"
TEST_ROOM2 = "!testroom:localhost"
@ -453,7 +454,10 @@ class TestClass(object):
await client.loop_stop()
async def test_history_fetching_tasks(self, client, aioresponse):
async def test_history_fetching_tasks(self, client, aioresponse, loop):
if not INDEXING_ENABLED:
pytest.skip("Indexing needs to be enabled to test this")
sync_url = re.compile(
r'^https://example\.org/_matrix/client/r0/sync\?access_token=.*'
)

View File

@ -1,11 +1,12 @@
import asyncio
import pdb
import pprint
import pytest
from nio import RoomMessage
from conftest import faker
from pantalaimon.index import Index, IndexStore
from pantalaimon.index import INDEXING_ENABLED
from pantalaimon.store import FetchTask
TEST_ROOM = "!SVkFJHzfwvuaIEawgC:localhost"
@ -95,6 +96,10 @@ class TestClass(object):
assert task2 in tasks
async def test_new_indexstore(self, tempdir):
if not INDEXING_ENABLED:
pytest.skip("Indexing needs to be enabled to test this")
from pantalaimon.index import Index, IndexStore
loop = asyncio.get_event_loop()
store = IndexStore("example", tempdir)