Skip to content

Commit 5b19a93

Browse files
committed
Rename MatchProcessing to DeletedTargetMatched
1 parent 9c968e8 commit 5b19a93

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

src/mock_vws/_flask_server/vwq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
)
2020
from mock_vws._query_validators import run_query_validators
2121
from mock_vws._query_validators.exceptions import (
22-
MatchProcessing,
22+
DeletedTargetMatched,
2323
ValidatorException,
2424
)
2525
from mock_vws.database import VuforiaDatabase
@@ -124,7 +124,7 @@ def query() -> Response:
124124
),
125125
)
126126
except ActiveMatchingTargetsDeleteProcessing as exc:
127-
raise MatchProcessing from exc
127+
raise DeletedTargetMatched from exc
128128

129129
headers = {
130130
'Content-Type': 'application/json',

src/mock_vws/_query_validators/exceptions.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,10 +657,9 @@ def __init__(self) -> None:
657657
}
658658

659659

660-
class MatchProcessing(ValidatorException):
660+
class DeletedTargetMatched(ValidatorException):
661661
"""
662-
Exception raised a target is matched which is processing or recently
663-
deleted.
662+
Exception raised when target which was recently deleted is matched.
664663
"""
665664

666665
def __init__(self) -> None:
@@ -682,9 +681,9 @@ def __init__(self) -> None:
682681
# * Do the most unexpected thing.
683682
# * Be consistent with every response.
684683
resources_dir = Path(__file__).parent.parent / 'resources'
685-
filename = 'match_processing_response.html'
686-
match_processing_resp_file = resources_dir / filename
687-
self.response_text = Path(match_processing_resp_file).read_text(
684+
filename = 'deleted_target_matched_response.html'
685+
deleted_target_matched_resp_file = resources_dir / filename
686+
self.response_text = Path(deleted_target_matched_resp_file).read_text(
688687
encoding='utf-8',
689688
)
690689
self.headers = {

src/mock_vws/_requests_mock_server/mock_web_query_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
)
2222
from mock_vws._query_validators import run_query_validators
2323
from mock_vws._query_validators.exceptions import (
24-
MatchProcessing,
24+
DeletedTargetMatched,
2525
ValidatorException,
2626
)
2727
from mock_vws.target_manager import TargetManager
@@ -138,10 +138,10 @@ def query(
138138
),
139139
)
140140
except ActiveMatchingTargetsDeleteProcessing:
141-
match_processing_exception = MatchProcessing()
142-
context.headers = match_processing_exception.headers
143-
context.status_code = match_processing_exception.status_code
144-
return match_processing_exception.response_text
141+
deleted_target_matched_exception = DeletedTargetMatched()
142+
context.headers = deleted_target_matched_exception.headers
143+
context.status_code = deleted_target_matched_exception.status_code
144+
return deleted_target_matched_exception.response_text
145145

146146
date = email.utils.formatdate(None, localtime=False, usegmt=True)
147147
context.headers = {

0 commit comments

Comments
 (0)