Skip to content

Commit

Permalink
fix: fix exception usage in queue repo test suite, after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
chisholm committed Oct 19, 2024
1 parent 5ab29f6 commit 6b1f8c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/restapi/test_queue_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import dioptra.restapi.db.models as m
from dioptra.restapi.db.models.constants import resource_lock_types
from dioptra.restapi.db.repository.errors import QueueSortError, UnsupportedFilterField
from dioptra.restapi.errors import SearchParseError, SortParameterValidationError
from dioptra.restapi.db.repository.utils import DeletionPolicy
from dioptra.restapi.db.shared_errors import (
ResourceDeletedError,
Expand Down Expand Up @@ -994,7 +994,7 @@ def test_queue_filter_null_field_2(queue_filter_setup, queue_repo):


def test_queue_filter_unsupported_sort(queue_repo):
with pytest.raises(QueueSortError):
with pytest.raises(SortParameterValidationError):
queue_repo.get_by_filters_paged(
group=None,
filters=[],
Expand All @@ -1007,7 +1007,7 @@ def test_queue_filter_unsupported_sort(queue_repo):


def test_queue_filter_unsupported_field(queue_repo):
with pytest.raises(UnsupportedFilterField):
with pytest.raises(SearchParseError):
queue_repo.get_by_filters_paged(
group=None,
filters=[{"field": "wrong", "value": ["foo"]}],
Expand Down

0 comments on commit 6b1f8c0

Please sign in to comment.