From ca44c46c002e8f73c89629f62323a2860e8a79e5 Mon Sep 17 00:00:00 2001 From: Prasanth Date: Mon, 13 Jan 2025 12:25:28 +0530 Subject: [PATCH] Fix #350 seperate column for errors (#352) * Fix #350 separate column for errors * Fix test cases --- .../server/handlers/basic_handlers.py | 85 ++++++++++++------ dothttp/exceptions.py | 13 +++ dothttp/parse/__init__.py | 7 +- dothttp/parse/request_base.py | 6 +- dothttp/utils/property_util.py | 31 ++++--- poetry.lock | 86 +++++++++++++++++-- pyproject.toml | 4 +- test/__init__.py | 6 ++ test/core/test_certs.py | 4 +- test/core/test_exceptions.py | 4 +- test/core/test_multidef_http.py | 4 +- 11 files changed, 200 insertions(+), 50 deletions(-) diff --git a/dotextensions/server/handlers/basic_handlers.py b/dotextensions/server/handlers/basic_handlers.py index bea2df3..6e1206d 100644 --- a/dotextensions/server/handlers/basic_handlers.py +++ b/dotextensions/server/handlers/basic_handlers.py @@ -51,17 +51,20 @@ def run(self, command: Command) -> Result: except DotHttpException as exc: logger.error(f"dothttp exception happened {exc}", exc_info=True) result = Result( - id=command.id, result={"error_message": exc.message, "error": True} + id=command.id, result={ + "error_message": exc.message, "error": True} ) except RequestException as exc: logger.error(f"exception from requests {exc}", exc_info=True) result = Result( - id=command.id, result={"error_message": str(exc), "error": True} + id=command.id, result={ + "error_message": str(exc), "error": True} ) except Exception as exc: logger.error(f"unknown error happened {exc}", exc_info=True) result = Result( - id=command.id, result={"error_message": str(exc), "error": True} + id=command.id, result={ + "error_message": str(exc), "error": True} ) return result @@ -71,14 +74,14 @@ def execute(self, command): req = self.get_curl_comp(config) result = req.get_curl_output() result = Result( - id=command.id, - result={ - "body": result, - "headers": { - "Content-Type": mimetypes.types_map[".sh"], - }, + id=command.id, + result={ + "body": result, + "headers": { + "Content-Type": mimetypes.types_map[".sh"], }, - ) + }, + ) else: comp = self.get_request_comp(config) result = self.get_request_result(command, comp) @@ -94,7 +97,8 @@ def get_config(self, command): target = params.get("target", "1") nocookie = params.get("nocookie", False) curl = params.get("curl", False) - properties = [f"{i}={j}" for i, j in params.get("properties", {}).items()] + properties = [f"{i}={j}" for i, + j in params.get("properties", {}).items()] content = params.get("content", None) contexts = params.get("contexts") property_file = params.get("property-file", None) @@ -123,6 +127,26 @@ def get_config(self, command): def get_request_result(self, command, comp: RequestCompiler): comp.load_def() + if comp.property_util.errors: + return Result( + id=command.id, + result={ + "errors": [{"var": list(error.kwargs['var']), "message": str(error)} for error in comp.property_util.errors], + "response": { + "body": "", + "output_file": "", + "status": 0, + "method": "ERROR", + "url": "ERROR", + "headers": { + "Content-Type": "text/plain", + }, + "error": True, + "error_message": "errors found", + "contentType": "text/plain", + }, + }, + ) resp = comp.get_response() if output := comp.httpdef.output: # body = f"Output stored in {output}" @@ -131,7 +155,8 @@ def get_request_result(self, command, comp: RequestCompiler): except Exception as e: output = f"Not!. unhandled error happened : {e}" logger.warning("unable to write because", exc_info=True) - script_result = comp.script_execution.execute_test_script(resp).as_json() + script_result = comp.script_execution.execute_test_script( + resp).as_json() body = resp.text response_data = { "response": { @@ -140,6 +165,7 @@ def get_request_result(self, command, comp: RequestCompiler): **self._get_resp_data(resp), }, "script_result": script_result, + "errors": [error.kwargs for error in comp.property_util.errors], } if resp.history: response_data["history"] = [ @@ -153,9 +179,11 @@ def get_request_result(self, command, comp: RequestCompiler): # redirects can add cookies comp.httpdef.headers["cookie"] = resp.request.headers["cookie"] try: - data.update({"http": self.get_http_from_req(comp.httpdef, comp.property_util)}) + data.update({"http": self.get_http_from_req( + comp.httpdef, comp.property_util)}) except Exception as e: - logger.error("ran into error regenerating http def from parsed object") + logger.error( + "ran into error regenerating http def from parsed object") data.update( {"http": f"ran into error \n Exception: `{e}` message:{e.args}"} ) @@ -175,7 +203,8 @@ def get_request_comp(self, config): @staticmethod def get_http_from_req(request: HttpDef, property_util: "PropertyProvider"): - http_def = MultidefHttp(import_list=[], allhttps=[request.get_http_from_req()]) + http_def = MultidefHttp(import_list=[], allhttps=[ + request.get_http_from_req()]) return HttpFileFormatter.format(http_def, property_util=property_util) @@ -200,7 +229,8 @@ def load_model(self): ## # context has varibles defined # for resolving purpose, including them into content - self.content = self.content + CONTEXT_SEP + CONTEXT_SEP.join(self.args.contexts) + self.content = self.content + CONTEXT_SEP + \ + CONTEXT_SEP.join(self.args.contexts) def select_target(self): for context in self.args.contexts: @@ -219,7 +249,7 @@ def select_target(self): self.model.import_list = model.import_list self.load_imports() self.content += context + "\n\n" + context - + except Exception as e: # contexts, can not always be correct syntax # in such scenarios, don't complain, try to resolve with @@ -277,19 +307,20 @@ def run(self, command: Command) -> Result: "headers": { "Content-Type": "text/plain", }, - "output_file":"", + "output_file": "", "error": True, "error_message": error_result, "contentType": "text/plain", } result = { "response": response, - "script_result": {"stdout": "", "error": "", "properties":{}, "tests":[]}, + "script_result": {"stdout": "", "error": "", "properties": {}, "tests": []}, "http": "REQUEST_EXECUTION_ERROR", "filenameExtension": ".txt", } result.update(response) - return Result(id=command.id, result=result) + return Result(id=command.id, result=result) + class FormatHttpFileHandler(BaseHandler): method = "/file/format" @@ -301,6 +332,7 @@ def run(self, command: Command) -> Result: result = Result(id=command.id, result=command.params) return result + class ResolveBase(): def get_resolved(self, command: Command) -> Result: @@ -320,7 +352,7 @@ def get_resolved(self, command: Command) -> Result: if match.start() <= pos <= match.end(): property_hovered = match.group()[2:-2].split("=")[0].strip() break - + type_dict = TypeFromPos.figure_n_get(model, pos) if "target" not in type_dict: command.params["target"] = 1 @@ -363,12 +395,14 @@ def get_resolved(self, command: Command) -> Result: return Result(id=command.id, result=type_dict) # return resolved string instead of model object + + class GetHoveredResolvedParamFileHandler(RunHttpFileHandler, ResolveBase): method = "/file/resolve" def get_method(self): return GetHoveredResolvedParamFileHandler.method - + def run(self, command): return self.get_resolved(command) @@ -382,6 +416,7 @@ def get_method(self): def run(self, command): return self.get_resolved(command) + class GetNameReferencesHandler(BaseHandler): name = "/file/names" @@ -394,7 +429,8 @@ def run(self, command: Command) -> Result: result = self.execute(command, filename) except DotHttpException as ex: result = Result( - id=command.id, result={"error_message": ex.message, "error": True} + id=command.id, result={ + "error_message": ex.message, "error": True} ) except Exception as e: result = Result( @@ -428,7 +464,8 @@ def parse_n_get(self, http_data, filename: str): for new_model, _content in BaseModelProcessor._get_models_from_import( model, filename ): - self.get_for_http(new_model.allhttps, imported_names, imported_urls) + self.get_for_http(new_model.allhttps, + imported_names, imported_urls) return all_names, all_urls, imported_names, imported_urls def get_for_http(self, allhttps, all_names, all_urls): diff --git a/dothttp/exceptions.py b/dothttp/exceptions.py index 8e8d74d..b4f432e 100644 --- a/dothttp/exceptions.py +++ b/dothttp/exceptions.py @@ -5,6 +5,7 @@ def wrapper(cls): class exc(cls): def __init__(self, **kwargs): self.message = message.format(**kwargs) + self.kwargs = kwargs return exc @@ -17,6 +18,18 @@ def __str__(self) -> str: return self.message +class DothttpMultiExceptions(DotHttpException): + def __init__(self, exceptions): + self.exceptions = exceptions + + @property + def message(self): + return "\n".join([str(exception) for exception in self.exceptions]) + + def __str__(self) -> str: + return "\n".join([str(exception) for exception in self.exceptions]) + + @exception_wrapper( "http def with name `{base}` not defined for http with name `{target}`" ) diff --git a/dothttp/parse/__init__.py b/dothttp/parse/__init__.py index 500cac4..15a1de1 100644 --- a/dothttp/parse/__init__.py +++ b/dothttp/parse/__init__.py @@ -182,6 +182,7 @@ def __init__(self, args: Config): self.content = "" self.original_content = self.content = "" self.property_util = PropertyProvider(self.property_file) + self.errors = [] self.load() def load(self): @@ -277,7 +278,11 @@ def load_content(self): self.original_content = self.content = f.read() def get_updated_content(self, content) -> str: - return self.property_util.get_updated_content(content) + try: + return self.property_util.get_updated_content(content) + except DotHttpException as e: + self.errors.append(e) + return content def get_updated_content_object(self, content) -> str: return self.property_util.get_updated_content(content, "obj") diff --git a/dothttp/parse/request_base.py b/dothttp/parse/request_base.py index 3f4ec66..7dd5458 100644 --- a/dothttp/parse/request_base.py +++ b/dothttp/parse/request_base.py @@ -18,7 +18,7 @@ from ..utils.property_util import PropertyProvider, Property -from ..exceptions import DothttpUnSignedCertException +from ..exceptions import DothttpMultiExceptions, DothttpUnSignedCertException from ..models.parse_models import Http, HttpFileType, MultidefHttp, ScriptType from ..parse import ( APPLICATION_JSON, @@ -480,6 +480,10 @@ def query_to_http(line): class RequestCompiler(RequestBase): def run(self): self.load_def() + if len(self.property_util.errors) > 0: + for error in self.errors: + eprint(error) + raise DothttpMultiExceptions(self.property_util.errors) resp = self.get_response() self.print_req_info(resp.request) for hist_resp in resp.history: diff --git a/dothttp/utils/property_util.py b/dothttp/utils/property_util.py index 30dc1c1..d60dc00 100644 --- a/dothttp/utils/property_util.py +++ b/dothttp/utils/property_util.py @@ -157,6 +157,7 @@ def __init__(self, property_file=""): self.command_line_properties = {} self.property_file = property_file self.is_running_system_command_enabled = False + self.errors = [] def enable_system_command(self): self.is_running_system_command_enabled = True @@ -238,19 +239,23 @@ def is_special_keyword(key): return ret or key.startswith("$expr:") def get_updated_content(self, content, type="str"): - content_prop_needed, props_needed = self.check_properties_for_content( - content) - for var in props_needed: - if type == "str": - value = self.resolve_property_string(var) - for text_to_replace in content_prop_needed[var].text: - content = content.replace( - "{{" + text_to_replace + "}}", str(value) - ) - else: - content = self.resolve_property_object(var) - base_logger.debug(f"using `{content}` for property {var}") - return content + try: + content_prop_needed, props_needed = self.check_properties_for_content( + content) + for var in props_needed: + if type == "str": + value = self.resolve_property_string(var) + for text_to_replace in content_prop_needed[var].text: + content = content.replace( + "{{" + text_to_replace + "}}", str(value) + ) + else: + content = self.resolve_property_object(var) + base_logger.debug(f"using `{content}` for property {var}") + return content + except PropertyNotFoundException as e: + self.errors.append(e) + return content def get_updated_obj_content(self, content): return self.get_updated_content(content, "obj") diff --git a/poetry.lock b/poetry.lock index 186d4ae..ea4fb75 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "arpeggio" @@ -6,6 +6,7 @@ version = "2.0.2" description = "Packrat parser interpreter" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "Arpeggio-2.0.2-py2.py3-none-any.whl", hash = "sha256:f7c8ae4f4056a89e020c24c7202ac8df3e2bc84e416746f20b0da35bb1de0250"}, {file = "Arpeggio-2.0.2.tar.gz", hash = "sha256:c790b2b06e226d2dd468e4fbfb5b7f506cec66416031fde1441cf1de2a0ba700"}, @@ -21,6 +22,7 @@ version = "24.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, @@ -40,6 +42,8 @@ version = "0.2.1" description = "Backport of the standard library zoneinfo module" optional = false python-versions = ">=3.6" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, @@ -68,6 +72,7 @@ version = "1.8.2" description = "Fast, simple object-to-object and broadcast signaling" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "blinker-1.8.2-py3-none-any.whl", hash = "sha256:1779309f71bf239144b9399d06ae925637cf6634cf6bd131104184531bf67c01"}, {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, @@ -79,6 +84,7 @@ version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, @@ -90,6 +96,8 @@ version = "1.17.1" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\"" files = [ {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, @@ -169,6 +177,7 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -270,6 +279,7 @@ version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, @@ -284,6 +294,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "platform_system == \"Windows\" or sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -295,6 +307,7 @@ version = "43.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"}, {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"}, @@ -344,6 +357,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -354,13 +369,14 @@ test = ["pytest (>=6)"] [[package]] name = "faker" -version = "33.1.0" +version = "33.3.0" description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ - {file = "Faker-33.1.0-py3-none-any.whl", hash = "sha256:d30c5f0e2796b8970de68978365247657486eb0311c5abe88d0b895b68dff05d"}, - {file = "faker-33.1.0.tar.gz", hash = "sha256:1c925fc0e86a51fc46648b504078c88d0cd48da1da2595c4e712841cab43a1e4"}, + {file = "Faker-33.3.0-py3-none-any.whl", hash = "sha256:ae074d9c7ef65817a93b448141a5531a16b2ea2e563dc5774578197c7c84060c"}, + {file = "faker-33.3.0.tar.gz", hash = "sha256:2abb551a05b75d268780b6095100a48afc43c53e97422002efbfc1272ebf5f26"}, ] [package.dependencies] @@ -373,6 +389,7 @@ version = "3.0.2" description = "A simple framework for building complex web applications." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "flask-3.0.2-py3-none-any.whl", hash = "sha256:3232e0e9c850d781933cf0207523d1ece087eb8d87b23777ae38456e2fbe7c6e"}, {file = "flask-3.0.2.tar.gz", hash = "sha256:822c03f4b799204250a7ee84b1eddc40665395333973dfb9deebfe425fefcb7d"}, @@ -396,6 +413,7 @@ version = "5.0.0" description = "A Flask extension adding a decorator for CORS support" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "Flask_Cors-5.0.0-py2.py3-none-any.whl", hash = "sha256:b9e307d082a9261c100d8fb0ba909eec6a228ed1b60a8315fd85f783d61910bc"}, {file = "flask_cors-5.0.0.tar.gz", hash = "sha256:5aadb4b950c4e93745034594d9f3ea6591f734bb3662e16e255ffbf5e89c88ef"}, @@ -410,6 +428,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -424,6 +443,8 @@ version = "8.5.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version < \"3.10\"" files = [ {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, @@ -447,6 +468,8 @@ version = "6.4.5" description = "Read resources from Python packages" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version < \"3.9\"" files = [ {file = "importlib_resources-6.4.5-py3-none-any.whl", hash = "sha256:ac29d5f956f01d5e4bb63102a5a19957f1b9175e45649977264a1416783bb717"}, {file = "importlib_resources-6.4.5.tar.gz", hash = "sha256:980862a1d16c9e147a59603677fa2aa5fd82b87f223b6cb870695bcfce830065"}, @@ -469,6 +492,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -480,6 +504,7 @@ version = "2.2.0" description = "Safely pass data to untrusted environments and back." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef"}, {file = "itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173"}, @@ -491,6 +516,7 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -508,6 +534,7 @@ version = "0.74" description = "JavaScript to Python Translator & JavaScript interpreter written in 100% pure Python." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "Js2Py-0.74-py3-none-any.whl", hash = "sha256:40a508a79e2f8d624e3f2e604f90a1e6f46ac75b416d7f4745939ff4a2e95e09"}, {file = "Js2Py-0.74.tar.gz", hash = "sha256:39f3a6aa8469180efba3c8677271df27c31332fd1b471df1af2af58b87b8972f"}, @@ -524,6 +551,7 @@ version = "4.23.0" description = "An implementation of JSON Schema validation for Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"}, {file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"}, @@ -547,6 +575,7 @@ version = "2023.12.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "jsonschema_specifications-2023.12.1-py3-none-any.whl", hash = "sha256:87e4fdf3a94858b8a2ba2778d9ba57d8a9cafca7c7489c46ba0d30a8bc6a9c3c"}, {file = "jsonschema_specifications-2023.12.1.tar.gz", hash = "sha256:48a76787b3e70f5ed53f1160d2b81f586e4ca6d1548c5de7085d1682674764cc"}, @@ -562,6 +591,7 @@ version = "0.0.2" description = "Library to parse JSON with js-style comments." optional = false python-versions = "*" +groups = ["main"] files = [ {file = "jstyleson-0.0.2.tar.gz", hash = "sha256:680003f3b15a2959e4e6a351f3b858e3c07dd3e073a0d54954e34d8ea5e1308e"}, ] @@ -572,6 +602,7 @@ version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, @@ -641,6 +672,7 @@ version = "1.1.0" description = "Library for Hawk HTTP authorization" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "mohawk-1.1.0-py3-none-any.whl", hash = "sha256:3ed296a30453d0b724679e0fd41e4e940497f8e461a9a9c3b7f36e43bab0fa09"}, {file = "mohawk-1.1.0.tar.gz", hash = "sha256:d2a0e3ab10a209cc79e95e28f2dd54bd4a73fd1998ffe27b7ba0f962b6be9723"}, @@ -655,6 +687,7 @@ version = "1.31.1" description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "msal-1.31.1-py3-none-any.whl", hash = "sha256:29d9882de247e96db01386496d59f29035e5e841bcac892e6d7bf4390bf6bd17"}, {file = "msal-1.31.1.tar.gz", hash = "sha256:11b5e6a3f802ffd3a72107203e20c4eac6ef53401961b880af2835b723d80578"}, @@ -674,6 +707,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -685,6 +719,7 @@ version = "0.3.2" description = "Use requests to talk HTTP via a UNIX domain socket" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "parsys_requests_unixsocket-0.3.2-py2.py3-none-any.whl", hash = "sha256:5c4fef9e30d1861df87872189f23bb31550754a337b493d00eeafd2078783f9b"}, {file = "parsys_requests_unixsocket-0.3.2.tar.gz", hash = "sha256:27f6a2345e6ef8d618500f4eb50229584f67df1f16e72fa753b7c9b42c45214d"}, @@ -700,6 +735,8 @@ version = "1.3.10" description = "Resolve a name to an object." optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "python_version < \"3.9\"" files = [ {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, @@ -711,6 +748,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -726,6 +764,8 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "platform_python_implementation != \"PyPy\"" files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, @@ -737,6 +777,7 @@ version = "2.7.1" description = "Fast javascript parser (based on esprima.js)" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "pyjsparser-2.7.1-py2-none-any.whl", hash = "sha256:2b12842df98d83f65934e0772fa4a5d8b123b3bc79f1af1789172ac70265dd21"}, {file = "pyjsparser-2.7.1.tar.gz", hash = "sha256:be60da6b778cc5a5296a69d8e7d614f1f870faf94e1b1b6ac591f2ad5d729579"}, @@ -748,6 +789,7 @@ version = "2.9.0" description = "JSON Web Token implementation in Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "PyJWT-2.9.0-py3-none-any.whl", hash = "sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850"}, {file = "pyjwt-2.9.0.tar.gz", hash = "sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c"}, @@ -768,6 +810,7 @@ version = "0.11.2" description = "Windows Negotiate Authentication Client and Server" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pyspnego-0.11.2-py3-none-any.whl", hash = "sha256:74abc1fb51e59360eb5c5c9086e5962174f1072c7a50cf6da0bda9a4bcfdfbd4"}, {file = "pyspnego-0.11.2.tar.gz", hash = "sha256:994388d308fb06e4498365ce78d222bf4f3570b6df4ec95738431f61510c971b"}, @@ -787,6 +830,7 @@ version = "8.3.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6"}, {file = "pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761"}, @@ -809,6 +853,7 @@ version = "4.1.1" description = "pytest plugin for generating HTML reports" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest_html-4.1.1-py3-none-any.whl", hash = "sha256:c8152cea03bd4e9bee6d525573b67bbc6622967b72b9628dda0ea3e2a0b5dd71"}, {file = "pytest_html-4.1.1.tar.gz", hash = "sha256:70a01e8ae5800f4a074b56a4cb1025c8f4f9b038bba5fe31e3c98eb996686f07"}, @@ -829,6 +874,7 @@ version = "3.1.1" description = "pytest plugin for test session metadata" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pytest_metadata-3.1.1-py3-none-any.whl", hash = "sha256:c8e0844db684ee1c798cfa38908d20d67d0463ecb6137c72e91f418558dd5f4b"}, {file = "pytest_metadata-3.1.1.tar.gz", hash = "sha256:d2a29b0355fbc03f168aa96d41ff88b1a3b44a3b02acbe491801c98a048017c8"}, @@ -846,6 +892,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -860,6 +907,7 @@ version = "0.4.27" description = "File type identification using libmagic" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["dev"] files = [ {file = "python-magic-0.4.27.tar.gz", hash = "sha256:c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b"}, {file = "python_magic-0.4.27-py2.py3-none-any.whl", hash = "sha256:c212960ad306f700aa0d01e5d7a325d20548ff97eb9920dcd29513174f0294d3"}, @@ -871,6 +919,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -933,6 +982,7 @@ version = "0.35.1" description = "JSON Referencing + Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "referencing-0.35.1-py3-none-any.whl", hash = "sha256:eda6d3234d62814d1c64e305c1331c9a3a6132da475ab6382eaa997b21ee75de"}, {file = "referencing-0.35.1.tar.gz", hash = "sha256:25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c"}, @@ -948,6 +998,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -969,6 +1020,7 @@ version = "1.3.1" description = "AWS4 authentication for Requests" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "requests_aws4auth-1.3.1-py3-none-any.whl", hash = "sha256:2969b5379ae6e60ee666638caf6cb94a32d67033f6bfcf0d50c95cd5474f2419"}, {file = "requests_aws4auth-1.3.1.tar.gz", hash = "sha256:b6ad4882310e03ba2538ebf94d1f001ca9feabc5c52618539cf1eb6d5af76791"}, @@ -986,6 +1038,7 @@ version = "1.2.1" description = "requests-hawk" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "requests-hawk-1.2.1.tar.gz", hash = "sha256:ad9205042c94bdb15afaa19b0780e11077b24d9e5cffac1fb3d26cb08aa435b7"}, {file = "requests_hawk-1.2.1-py2.py3-none-any.whl", hash = "sha256:afe8add3c72a21405543a07464b62e36a5f378585e5cf3b54b1307e884f67324"}, @@ -1001,6 +1054,7 @@ version = "1.3.0" description = "This package allows for HTTP NTLM authentication using the requests library." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "requests_ntlm-1.3.0-py3-none-any.whl", hash = "sha256:4c7534a7d0e482bb0928531d621be4b2c74ace437e88c5a357ceb7452d25a510"}, {file = "requests_ntlm-1.3.0.tar.gz", hash = "sha256:b29cc2462623dffdf9b88c43e180ccb735b4007228a542220e882c58ae56c668"}, @@ -1017,6 +1071,7 @@ version = "1.25" description = "Add PKCS#12 support to the requests library in a clean way, without monkey patching or temporary files" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "requests_pkcs12-1.25-py3-none-any.whl", hash = "sha256:94fbd01958f6386198be04a1cb6f2f0c86bd2d89e0bf6fe5d09cfba874f23936"}, {file = "requests_pkcs12-1.25.tar.gz", hash = "sha256:39d64144d9443c29fd7e9d4c33f6bcb8cda5ceedcb953030d6ea847f1889b410"}, @@ -1035,6 +1090,7 @@ version = "7.4" description = "RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment." optional = false python-versions = "<3.14,>=3.8" +groups = ["main"] files = [ {file = "RestrictedPython-7.4-py3-none-any.whl", hash = "sha256:f431c76f848f6f6d50ae21457cb503642db60889a273e4be439cf7ca4cbaf999"}, {file = "restrictedpython-7.4.tar.gz", hash = "sha256:81b62924713dbd280917fceaecaf210fef7a49dddf1a08c8c214a3613fbeb425"}, @@ -1050,6 +1106,7 @@ version = "0.20.1" description = "Python bindings to Rust's persistent data structures (rpds)" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "rpds_py-0.20.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a649dfd735fff086e8a9d0503a9f0c7d01b7912a333c7ae77e1515c08c146dad"}, {file = "rpds_py-0.20.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f16bc1334853e91ddaaa1217045dd7be166170beec337576818461268a3de67f"}, @@ -1162,6 +1219,7 @@ version = "1.17.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main", "dev"] files = [ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"}, {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"}, @@ -1173,6 +1231,8 @@ version = "0.2.0" description = "SSPI API bindings for Python" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "sys_platform == \"win32\"" files = [ {file = "sspilib-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:34f566ba8b332c91594e21a71200de2d4ce55ca5a205541d4128ed23e3c98777"}, {file = "sspilib-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5b11e4f030de5c5de0f29bcf41a6e87c9fd90cb3b0f64e446a6e1d1aef4d08f5"}, @@ -1218,6 +1278,7 @@ version = "4.1.0" description = "Meta-language for DSL implementation inspired by Xtext" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "textx-4.1.0-py3-none-any.whl", hash = "sha256:297784421e81a27b3701c968cf820353b79969e0d443f4ca6ac9352a827bf871"}, {file = "textx-4.1.0.tar.gz", hash = "sha256:37b4f0c455452e27cc0f13d40777b5d20549eaa871311b26e2ed83c019456692"}, @@ -1238,6 +1299,7 @@ version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main"] files = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, @@ -1249,6 +1311,8 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -1290,6 +1354,7 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -1301,6 +1366,8 @@ version = "2024.2" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" +groups = ["dev"] +markers = "platform_system == \"Windows\"" files = [ {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, @@ -1312,6 +1379,7 @@ version = "5.2" description = "tzinfo object for the local timezone" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"}, {file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"}, @@ -1330,6 +1398,7 @@ version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, @@ -1347,6 +1416,7 @@ version = "3.0.0" description = "Waitress WSGI server" optional = false python-versions = ">=3.8.0" +groups = ["dev"] files = [ {file = "waitress-3.0.0-py3-none-any.whl", hash = "sha256:2a06f242f4ba0cc563444ca3d1998959447477363a2d7e9b8b4d75d35cfd1669"}, {file = "waitress-3.0.0.tar.gz", hash = "sha256:005da479b04134cdd9dd602d1ee7c49d79de0537610d653674cc6cbde222b8a1"}, @@ -1362,6 +1432,7 @@ version = "3.0.6" description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "werkzeug-3.0.6-py3-none-any.whl", hash = "sha256:1bc0c2310d2fbb07b1dd1105eba2f7af72f322e1e455f2f93c993bee8c8a5f17"}, {file = "werkzeug-3.0.6.tar.gz", hash = "sha256:a8dd59d4de28ca70471a34cba79bed5f7ef2e036a76b3ab0835474246eb41f8d"}, @@ -1379,6 +1450,7 @@ version = "0.14.2" description = "Makes working with XML feel like you are working with JSON" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "xmltodict-0.14.2-py2.py3-none-any.whl", hash = "sha256:20cc7d723ed729276e808f26fb6b3599f786cbc37e06c65e192ba77c40f20aac"}, {file = "xmltodict-0.14.2.tar.gz", hash = "sha256:201e7c28bb210e374999d1dde6382923ab0ed1a8a5faeece48ab525b7810a553"}, @@ -1390,6 +1462,8 @@ version = "3.20.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] +markers = "python_version < \"3.10\"" files = [ {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, @@ -1407,6 +1481,6 @@ type = ["pytest-mypy"] js = [] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = ">=3.8,<3.14" -content-hash = "20d7207bfe8726dfb2302b45670c0f105813879d653869d2bc28329409481792" +content-hash = "4be0887541f0890d2bc61ecec32b72aefb931647f88943abce09135bf1356af5" diff --git a/pyproject.toml b/pyproject.toml index 3b576fd..a1d24cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dothttp-req" -version = "0.0.44a10" +version = "0.0.44a11" description = "Dothttp is Simple http client for testing and development" authors = ["Prasanth "] license = "MIT" @@ -30,7 +30,7 @@ parsys-requests-unixsocket = "0.3.2" requests-aws4auth = "1.3.1" requests-ntlm = "1.3.0" restrictedpython = "7.4" -faker = "33.1.0" +faker = "33.3.0" requests-hawk = "1.2.1" msal = "1.31.1" pyyaml = "6.0.2" diff --git a/test/__init__.py b/test/__init__.py index c76add2..4760a28 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -16,6 +16,12 @@ def get_request(file, env=None, prop=None, properties=None, target=None): file, env, prop, properties, target=target ).get_request() + @staticmethod + def get_request_comp(file, env=None, prop=None, properties=None, target=None): + return TestBase.get_req_comp( + file, env, prop, properties, target=target + ) + @staticmethod def get_req_comp( file, diff --git a/test/core/test_certs.py b/test/core/test_certs.py index 67bae6d..89638eb 100644 --- a/test/core/test_certs.py +++ b/test/core/test_certs.py @@ -18,7 +18,9 @@ class CertUnitTest(TestBase): def test_fail_no_property_certificate(self): with self.assertRaises(PropertyNotFoundException): filename = f"{http_base}/no-password.http" - self.get_request(filename, target="no-password") + comp = self.get_request_comp(filename, target="no-password") + comp.get_request() + raise comp.property_util.errors[0] def test_certificate_available(self): filename = f"{http_base}/no-password.http" diff --git a/test/core/test_exceptions.py b/test/core/test_exceptions.py index 83f11ca..d0e5637 100644 --- a/test/core/test_exceptions.py +++ b/test/core/test_exceptions.py @@ -26,9 +26,11 @@ def test_property_file_not_json(self): def test_property_not_found(self): with self.assertRaises(PropertyNotFoundException): - self.get_request( + comp = self.get_request_comp( f"{sub_base_path}/multipleprop.http", prop=f"{sub_base_path}/prop1.json" ) + comp.get_request() + raise comp.property_util.errors[0] def test_commmand_line_not_found(self): with self.assertRaises(CommandLinePropError): diff --git a/test/core/test_multidef_http.py b/test/core/test_multidef_http.py index d7b9092..c6a9207 100644 --- a/test/core/test_multidef_http.py +++ b/test/core/test_multidef_http.py @@ -44,7 +44,9 @@ def test_infileunresolved_prop_http(self): # should run as it is not using any vars with self.assertRaises(PropertyNotFoundException): # should fail with unresolved properties - self.get_request(f"{base_dir}/multi.http", target=5) + comp = self.get_request_comp(f"{base_dir}/multi.http", target=5) + comp.get_request() + raise comp.property_util.errors[0] # should pass when required properties are sent req = self.get_request( f"{base_dir}/multi.http",