File tree Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 19
19
)
20
20
from mock_vws ._query_validators import run_query_validators
21
21
from mock_vws ._query_validators .exceptions import (
22
- MatchProcessing ,
22
+ DeletedTargetMatched ,
23
23
ValidatorException ,
24
24
)
25
25
from mock_vws .database import VuforiaDatabase
@@ -124,7 +124,7 @@ def query() -> Response:
124
124
),
125
125
)
126
126
except ActiveMatchingTargetsDeleteProcessing as exc :
127
- raise MatchProcessing from exc
127
+ raise DeletedTargetMatched from exc
128
128
129
129
headers = {
130
130
'Content-Type' : 'application/json' ,
Original file line number Diff line number Diff line change @@ -657,10 +657,9 @@ def __init__(self) -> None:
657
657
}
658
658
659
659
660
- class MatchProcessing (ValidatorException ):
660
+ class DeletedTargetMatched (ValidatorException ):
661
661
"""
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.
664
663
"""
665
664
666
665
def __init__ (self ) -> None :
@@ -682,9 +681,9 @@ def __init__(self) -> None:
682
681
# * Do the most unexpected thing.
683
682
# * Be consistent with every response.
684
683
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 (
688
687
encoding = 'utf-8' ,
689
688
)
690
689
self .headers = {
Original file line number Diff line number Diff line change 21
21
)
22
22
from mock_vws ._query_validators import run_query_validators
23
23
from mock_vws ._query_validators .exceptions import (
24
- MatchProcessing ,
24
+ DeletedTargetMatched ,
25
25
ValidatorException ,
26
26
)
27
27
from mock_vws .target_manager import TargetManager
@@ -138,10 +138,10 @@ def query(
138
138
),
139
139
)
140
140
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
145
145
146
146
date = email .utils .formatdate (None , localtime = False , usegmt = True )
147
147
context .headers = {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments