1717from tests .mock_vws .fixtures .credentials import VuMarkCloudDatabase
1818from tests .mock_vws .utils import Endpoint
1919
20- VWS_HOST = "https://vws.vuforia.com"
21- VWQ_HOST = "https://cloudreco.vuforia.com"
22-
2320
2421@pytest .fixture
2522def add_target (
2623 * ,
2724 vuforia_database : CloudDatabase ,
25+ base_vws_url : str ,
2826 image_file_failed_state : io .BytesIO ,
2927) -> Endpoint :
3028 """Return details of the endpoint for adding a target."""
@@ -66,7 +64,7 @@ def add_target(
6664 return Endpoint (
6765 successful_headers_status_code = HTTPStatus .CREATED ,
6866 successful_headers_result_code = ResultCodes .TARGET_CREATED ,
69- base_url = VWS_HOST ,
67+ base_url = base_vws_url ,
7068 path_url = request_path ,
7169 method = method ,
7270 headers = headers ,
@@ -80,6 +78,7 @@ def add_target(
8078def delete_target (
8179 * ,
8280 vuforia_database : CloudDatabase ,
81+ base_vws_url : str ,
8382 target_id : str ,
8483) -> Endpoint :
8584 """Return details of the endpoint for deleting a target."""
@@ -107,7 +106,7 @@ def delete_target(
107106 }
108107
109108 return Endpoint (
110- base_url = VWS_HOST ,
109+ base_url = base_vws_url ,
111110 path_url = request_path ,
112111 method = method ,
113112 headers = headers ,
@@ -120,7 +119,11 @@ def delete_target(
120119
121120
122121@pytest .fixture
123- def database_summary (* , vuforia_database : CloudDatabase ) -> Endpoint :
122+ def database_summary (
123+ * ,
124+ vuforia_database : CloudDatabase ,
125+ base_vws_url : str ,
126+ ) -> Endpoint :
124127 """
125128 Return details of the endpoint for getting details about the
126129 database.
@@ -150,7 +153,7 @@ def database_summary(*, vuforia_database: CloudDatabase) -> Endpoint:
150153 }
151154
152155 return Endpoint (
153- base_url = VWS_HOST ,
156+ base_url = base_vws_url ,
154157 path_url = request_path ,
155158 method = method ,
156159 headers = headers ,
@@ -166,6 +169,7 @@ def database_summary(*, vuforia_database: CloudDatabase) -> Endpoint:
166169def get_duplicates (
167170 * ,
168171 vuforia_database : CloudDatabase ,
172+ base_vws_url : str ,
169173 target_id : str ,
170174) -> Endpoint :
171175 """
@@ -197,7 +201,7 @@ def get_duplicates(
197201 }
198202
199203 return Endpoint (
200- base_url = VWS_HOST ,
204+ base_url = base_vws_url ,
201205 path_url = request_path ,
202206 method = method ,
203207 headers = headers ,
@@ -213,6 +217,7 @@ def get_duplicates(
213217def get_target (
214218 * ,
215219 vuforia_database : CloudDatabase ,
220+ base_vws_url : str ,
216221 target_id : str ,
217222) -> Endpoint :
218223 """Return details of the endpoint for getting details of a target."""
@@ -243,7 +248,7 @@ def get_target(
243248 return Endpoint (
244249 successful_headers_status_code = HTTPStatus .OK ,
245250 successful_headers_result_code = ResultCodes .SUCCESS ,
246- base_url = VWS_HOST ,
251+ base_url = base_vws_url ,
247252 path_url = request_path ,
248253 method = method ,
249254 headers = headers ,
@@ -254,7 +259,11 @@ def get_target(
254259
255260
256261@pytest .fixture
257- def target_list (* , vuforia_database : CloudDatabase ) -> Endpoint :
262+ def target_list (
263+ * ,
264+ vuforia_database : CloudDatabase ,
265+ base_vws_url : str ,
266+ ) -> Endpoint :
258267 """Return details of the endpoint for getting a list of targets."""
259268 date = rfc_1123_date ()
260269 request_path = "/targets"
@@ -283,7 +292,7 @@ def target_list(*, vuforia_database: CloudDatabase) -> Endpoint:
283292 return Endpoint (
284293 successful_headers_status_code = HTTPStatus .OK ,
285294 successful_headers_result_code = ResultCodes .SUCCESS ,
286- base_url = VWS_HOST ,
295+ base_url = base_vws_url ,
287296 path_url = request_path ,
288297 method = method ,
289298 headers = headers ,
@@ -297,6 +306,7 @@ def target_list(*, vuforia_database: CloudDatabase) -> Endpoint:
297306def target_summary (
298307 * ,
299308 vuforia_database : CloudDatabase ,
309+ base_vws_url : str ,
300310 target_id : str ,
301311) -> Endpoint :
302312 """
@@ -330,7 +340,7 @@ def target_summary(
330340 return Endpoint (
331341 successful_headers_status_code = HTTPStatus .OK ,
332342 successful_headers_result_code = ResultCodes .SUCCESS ,
333- base_url = VWS_HOST ,
343+ base_url = base_vws_url ,
334344 path_url = request_path ,
335345 method = method ,
336346 headers = headers ,
@@ -344,6 +354,7 @@ def target_summary(
344354def update_target (
345355 * ,
346356 vuforia_database : CloudDatabase ,
357+ base_vws_url : str ,
347358 target_id : str ,
348359) -> Endpoint :
349360 """Return details of the endpoint for updating a target."""
@@ -377,7 +388,7 @@ def update_target(
377388 return Endpoint (
378389 successful_headers_status_code = HTTPStatus .OK ,
379390 successful_headers_result_code = ResultCodes .SUCCESS ,
380- base_url = VWS_HOST ,
391+ base_url = base_vws_url ,
381392 path_url = request_path ,
382393 method = method ,
383394 headers = headers ,
@@ -391,6 +402,7 @@ def update_target(
391402def query (
392403 * ,
393404 vuforia_database : CloudDatabase ,
405+ base_vwq_url : str ,
394406 high_quality_image : io .BytesIO ,
395407) -> Endpoint :
396408 """
@@ -428,7 +440,7 @@ def query(
428440 return Endpoint (
429441 successful_headers_status_code = HTTPStatus .OK ,
430442 successful_headers_result_code = ResultCodes .SUCCESS ,
431- base_url = VWQ_HOST ,
443+ base_url = base_vwq_url ,
432444 path_url = request_path ,
433445 method = method ,
434446 headers = headers ,
@@ -442,6 +454,7 @@ def query(
442454def vumark_generate_instance (
443455 * ,
444456 vumark_vuforia_database : VuMarkCloudDatabase ,
457+ base_vws_url : str ,
445458) -> Endpoint :
446459 """Return details of the endpoint for generating a VuMark instance."""
447460 request_path = f"/targets/{ vumark_vuforia_database .target_id } /instances"
@@ -475,7 +488,7 @@ def vumark_generate_instance(
475488 return Endpoint (
476489 successful_headers_status_code = HTTPStatus .OK ,
477490 successful_headers_result_code = None ,
478- base_url = VWS_HOST ,
491+ base_url = base_vws_url ,
479492 path_url = request_path ,
480493 method = method ,
481494 headers = headers ,
@@ -486,7 +499,11 @@ def vumark_generate_instance(
486499
487500
488501@pytest .fixture
489- def reco_counts_report (* , vuforia_database : CloudDatabase ) -> Endpoint :
502+ def reco_counts_report (
503+ * ,
504+ vuforia_database : CloudDatabase ,
505+ base_vws_url : str ,
506+ ) -> Endpoint :
490507 """Return details of the endpoint for requesting a reco counts
491508 report.
492509 """
@@ -521,7 +538,7 @@ def reco_counts_report(*, vuforia_database: CloudDatabase) -> Endpoint:
521538 return Endpoint (
522539 successful_headers_status_code = HTTPStatus .OK ,
523540 successful_headers_result_code = ResultCodes .SUCCESS ,
524- base_url = VWS_HOST ,
541+ base_url = base_vws_url ,
525542 path_url = request_path ,
526543 method = method ,
527544 headers = headers ,
0 commit comments