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 1919)
2020from mock_vws ._query_validators import run_query_validators
2121from mock_vws ._query_validators .exceptions import (
22- MatchProcessing ,
22+ DeletedTargetMatched ,
2323 ValidatorException ,
2424)
2525from 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' ,
Original file line number Diff line number Diff 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 = {
Original file line number Diff line number Diff line change 2121)
2222from mock_vws ._query_validators import run_query_validators
2323from mock_vws ._query_validators .exceptions import (
24- MatchProcessing ,
24+ DeletedTargetMatched ,
2525 ValidatorException ,
2626)
2727from 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 = {
File renamed without changes.
You can’t perform that action at this time.
0 commit comments