Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Nov 8, 2023
1 parent 529d6bd commit 3426c99
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/unit/service/test_analyzer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

import pytest

from test import DEFAULT_ES_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_BOOST_LAUNCH
from app.service.analyzer_service import AnalyzerService

from test import DEFAULT_ES_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_BOOST_LAUNCH

DEFAULT_LAUNCH_NAME = 'Test Launch'
DEFAULT_LAUNCH_ID = 3
Expand All @@ -44,9 +43,12 @@ def get_empty_bool_query():
(2, 'LAUNCH_NAME', DEFAULT_LAUNCH_NAME_SEARCH),
(2, 'CURRENT_AND_THE_SAME_NAME', DEFAULT_LAUNCH_NAME_SEARCH),
(2, 'CURRENT_LAUNCH', {'must': [{'term': {'launch_id': {'value': DEFAULT_LAUNCH_ID}}}], 'should': []}),
(2, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': 1}}}], 'should': []}),
(None, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': -1}}}], 'should': []}),
('3', 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': 2}}}], 'should': []}),
(2, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': 1}}},
{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME}}}], 'should': []}),
(None, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': -1}}},
{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME}}}], 'should': []}),
('3', 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_number': {'value': 2}}},
{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME}}}], 'should': []}),
(2, None, {'must': [], 'should': [{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME,
'boost': DEFAULT_BOOST_LAUNCH}}}]})
]
Expand Down

0 comments on commit 3426c99

Please sign in to comment.