Skip to content

Commit

Permalink
Try speeding up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed May 3, 2024
1 parent 77f3994 commit e193073
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 4 additions & 7 deletions tests/fixtures/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
import pytest
from celery import Celery

from palace.manager.search.external_search import ExternalSearchIndex
from palace.manager.search.revision_directory import SearchRevisionDirectory
from palace.manager.search.service import SearchServiceOpensearch1
from palace.manager.service.analytics.analytics import Analytics
from palace.manager.service.analytics.container import AnalyticsContainer
from palace.manager.service.celery.container import CeleryContainer
Expand Down Expand Up @@ -86,10 +83,10 @@ class ServicesSearchFixture:
@pytest.fixture
def services_search_fixture() -> ServicesSearchFixture:
search_container = Search()
client_mock = create_autospec(boto3.client)
service_mock = create_autospec(SearchServiceOpensearch1)
revision_directory_mock = create_autospec(SearchRevisionDirectory.create)
index_mock = create_autospec(ExternalSearchIndex)
client_mock = MagicMock()
service_mock = MagicMock()
revision_directory_mock = MagicMock()
index_mock = MagicMock()
search_container.client.override(client_mock)
search_container.service.override(service_mock)
search_container.revision_directory.override(revision_directory_mock)
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def stop(self) -> None:
)
self._server.shutdown()
self._server.server_close()
self._server_thread.join(timeout=10)

def enqueue_response(
self, request_method: str, request_path: str, response: MockAPIServerResponse
Expand Down

0 comments on commit e193073

Please sign in to comment.