Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Dec 1, 2023
1 parent fe4cd8c commit b647b79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/unit/service/test_unit_analyzer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
DEFAULT_LAUNCH_NAME = 'Test Launch'
DEFAULT_LAUNCH_ID = 3

DEFAULT_LAUNCH_NAME_SEARCH = {'must': [{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME}}}],
DEFAULT_LAUNCH_NAME_SEARCH = {'must': [{'term': {'launch_name': DEFAULT_LAUNCH_NAME}}],
'should': [{'term': {'launch_id': {'value': DEFAULT_LAUNCH_ID,
'boost': DEFAULT_BOOST_LAUNCH}}}]}
DEFAULT_LAUNCH_BOOST = {'should': [
Expand All @@ -34,13 +34,13 @@
@pytest.mark.parametrize(
'previous_launch_id, launch_mode, expected_query',
[
(2, 'LAUNCH_NAME', {'must': [{'term': {'launch_name': {'value': DEFAULT_LAUNCH_NAME}}}],
'must_not': [{'term': {'launch_id': {'value': DEFAULT_LAUNCH_ID}}}]}),
(2, 'LAUNCH_NAME', {'must': [{'term': {'launch_name': DEFAULT_LAUNCH_NAME}}],
'must_not': [{'term': {'launch_id': DEFAULT_LAUNCH_ID}}]}),
(2, 'CURRENT_AND_THE_SAME_NAME', DEFAULT_LAUNCH_NAME_SEARCH),
(2, 'CURRENT_LAUNCH', {'must': [{'term': {'launch_id': {'value': DEFAULT_LAUNCH_ID}}}]}),
(2, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_id': {'value': 2}}}]}),
(2, 'CURRENT_LAUNCH', {'must': [{'term': {'launch_id': DEFAULT_LAUNCH_ID}}]}),
(2, 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_id': 2}}]}),
(None, 'PREVIOUS_LAUNCH', {}),
('3', 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_id': {'value': 3}}}]}),
('3', 'PREVIOUS_LAUNCH', {'must': [{'term': {'launch_id': 3}}]}),
(2, None, DEFAULT_LAUNCH_BOOST)
]
)
Expand Down

0 comments on commit b647b79

Please sign in to comment.