Title: 0.16.5: pytest is failing in few units · Issue #525 · python-openapi/openapi-core · GitHub
Open Graph Title: 0.16.5: pytest is failing in few units · Issue #525 · python-openapi/openapi-core
X Title: 0.16.5: pytest is failing in few units · Issue #525 · python-openapi/openapi-core
Description: I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. python3 -sBm build -w --no-isolation because I'm calling build with --no-iso...
Open Graph Description: I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. python3 -sBm build -w --no-isolation...
X Description: I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. python3 -sBm build -w --no-i...
Opengraph URL: https://github.com/python-openapi/openapi-core/issues/525
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"0.16.5: pytest is failing in few units","articleBody":"I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.\r\n- `python3 -sBm build -w --no-isolation`\r\n- because I'm calling `build` with `--no-isolation` I'm using during all processes only locally installed modules\r\n- install .whl file in \u003c/install/prefix\u003e\r\n- run pytest with $PYTHONPATH pointing to sitearch and sitelib inside \u003c/install/prefix\u003e\r\n- build is performed in env which is *`cut off from access to the public network`* (pytest is executed with `-m \"not network\"`)\r\n\r\nHere is pytest output:\r\n\u003cdetails\u003e\r\n\r\n```console\r\n+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-openapi-core-0.16.5-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-openapi-core-0.16.5-3.fc35.x86_64/usr/lib/python3.8/site-packages\r\n+ /usr/bin/pytest -ra -m 'not network'\r\n==================================================================================== test session starts ====================================================================================\r\nplatform linux -- Python 3.8.16, pytest-7.2.1, pluggy-1.0.0\r\nrootdir: /home/tkloczko/rpmbuild/BUILD/openapi-core-0.16.5, configfile: pyproject.toml\r\nplugins: anyio-3.6.2, flake8-1.1.1\r\ncollected 742 items\r\n\r\ntests/integration/contrib/django/test_django_project.py Bad Request: /v1/pets\r\n..Bad Request: /v1/pets\r\n.Bad Request: /v1/pets\r\n.Unsupported Media Type: /v1/pets\r\n.Bad Request: /v1/pets\r\n...Invalid HTTP_HOST header: 'testserver'. You may need to add 'testserver' to ALLOWED_HOSTS.\r\nBad Request: /v1/pets/12\r\n.Forbidden: /v1/pets/12\r\n.Method Not Allowed: /v1/pets/12\r\n...\r\ntests/integration/contrib/falcon/test_falcon_project.py .............\r\ntests/integration/contrib/flask/test_flask_decorator.py ......\r\ntests/integration/contrib/flask/test_flask_validator.py .\r\ntests/integration/contrib/flask/test_flask_views.py .......\r\ntests/integration/contrib/requests/test_requests_validation.py ...\r\ntests/integration/contrib/starlette/test_starlette_validation.py ..\r\ntests/integration/contrib/werkzeug/test_werkzeug_validation.py ...\r\ntests/integration/schema/test_empty.py .\r\ntests/integration/schema/test_link_spec.py ....\r\ntests/integration/schema/test_path_params.py ..\r\ntests/integration/schema/test_spec.py ..\r\ntests/integration/validation/test_minimal.py ............................................................\r\ntests/integration/validation/test_petstore.py .....................................\r\ntests/integration/validation/test_read_only_write_only.py ....\r\ntests/integration/validation/test_security_override.py .....\r\ntests/integration/validation/test_validators.py ............................\r\ntests/unit/test_util.py .................\r\ntests/unit/casting/test_schema_casters.py ....\r\ntests/unit/contrib/django/test_django.py ......\r\ntests/unit/contrib/flask/test_flask_requests.py ...\r\ntests/unit/contrib/flask/test_flask_responses.py .\r\ntests/unit/contrib/requests/test_requests_requests.py ...\r\ntests/unit/contrib/requests/test_requests_responses.py .\r\ntests/unit/deserializing/test_media_types_deserializers.py .........\r\ntests/unit/deserializing/test_parameters_deserializers.py ...\r\ntests/unit/extensions/test_factories.py ..\r\ntests/unit/schema/test_schema_parameters.py .....................................................................................................................................................\r\ntests/unit/security/test_providers.py .........\r\ntests/unit/templating/test_media_types_finders.py ....\r\ntests/unit/templating/test_paths_finders.py X..x..x...........X..x..x...........\r\ntests/unit/templating/test_responses_finders.py ...\r\ntests/unit/templating/test_templating_util.py ..\r\ntests/unit/unmarshalling/test_unmarshal.py ....................................................................x.........................\r\ntests/unit/unmarshalling/test_validate.py .........................................................................................F.........F.......F......FFFF...................................................................................\r\ntests/unit/validation/test_request_shortcuts.py ..\r\ntests/unit/validation/test_response_shortcuts.py ..\r\n\r\n========================================================================================= FAILURES ==========================================================================================\r\n_________________________________________________________________ TestSchemaValidate.test_string_format_date_invalid[true] __________________________________________________________________\r\n\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2070\u003e, value = b'true'\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783ea310\u003e\r\n\r\n @pytest.mark.parametrize(\r\n \"value\",\r\n [\r\n b\"true\",\r\n \"test\",\r\n False,\r\n 1,\r\n 3.14,\r\n [1, 3],\r\n datetime.datetime(1989, 1, 2),\r\n ],\r\n )\r\n def test_string_format_date_invalid(self, value, validator_factory):\r\n schema = {\r\n \"type\": \"string\",\r\n \"format\": \"date\",\r\n }\r\n spec = Spec.from_dict(schema)\r\n\r\n with pytest.raises(InvalidSchemaValue):\r\n\u003e validator_factory(spec).validate(value)\r\nE Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\n\r\nschema = {'format': 'date', 'type': 'string'}\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2070\u003e\r\nspec = Spec('')\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783ea310\u003e\r\nvalue = b'true'\r\n\r\ntests/unit/unmarshalling/test_validate.py:404: Failed\r\n_________________________________________________________________ TestSchemaValidate.test_string_format_uuid_invalid[true0] _________________________________________________________________\r\n\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2700\u003e, value = b'true'\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783eaf70\u003e\r\n\r\n @pytest.mark.parametrize(\r\n \"value\",\r\n [\r\n b\"true\",\r\n \"true\",\r\n False,\r\n 1,\r\n 3.14,\r\n [1, 3],\r\n datetime.date(2018, 1, 2),\r\n datetime.datetime(2018, 1, 2, 23, 59, 59),\r\n ],\r\n )\r\n def test_string_format_uuid_invalid(self, value, validator_factory):\r\n schema = {\r\n \"type\": \"string\",\r\n \"format\": \"uuid\",\r\n }\r\n spec = Spec.from_dict(schema)\r\n\r\n with pytest.raises(InvalidSchemaValue):\r\n\u003e validator_factory(spec).validate(value)\r\nE Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\n\r\nschema = {'format': 'uuid', 'type': 'string'}\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2700\u003e\r\nspec = Spec('')\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783eaf70\u003e\r\nvalue = b'true'\r\n\r\ntests/unit/unmarshalling/test_validate.py:462: Failed\r\n_______________________________________________________________ TestSchemaValidate.test_string_format_datetime_invalid[true0] _______________________________________________________________\r\n\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2c70\u003e, value = b'true'\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783ea790\u003e\r\n\r\n @pytest.mark.parametrize(\r\n \"value\",\r\n [\r\n b\"true\",\r\n \"true\",\r\n False,\r\n 1,\r\n 3.14,\r\n [1, 3],\r\n \"1989-01-02\",\r\n ],\r\n )\r\n def test_string_format_datetime_invalid(self, value, validator_factory):\r\n schema = {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\",\r\n }\r\n spec = Spec.from_dict(schema)\r\n\r\n with pytest.raises(InvalidSchemaValue):\r\n\u003e validator_factory(spec).validate(value)\r\nE Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\n\r\nschema = {'format': 'date-time', 'type': 'string'}\r\nself = \u003ctest_validate.TestSchemaValidate object at 0x7fdf7b9b2c70\u003e\r\nspec = Spec('')\r\nvalidator_factory = \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf783ea790\u003e\r\nvalue = b'true'\r\n\r\ntests/unit/unmarshalling/test_validate.py:484: Failed\r\n____________________________________________________ TestSchemaValidate.test_string_format_datetime_strict_rfc3339[1989-01-02T00:00:00Z] ____________________________________________________\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842190\u003e,)\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c4c0\u003e, 'value': '1989-01-02T00:00:00Z'}\r\n\r\n @wraps(func)\r\n def patched(*args, **keywargs):\r\n\u003e with self.decoration_helper(patched,\r\n args,\r\n keywargs) as (newargs, newkeywargs):\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842190\u003e,)\r\nfunc = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba160d0\u003e\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c4c0\u003e, 'value': '1989-01-02T00:00:00Z'}\r\npatched = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba16160\u003e\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1322:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n/usr/lib64/python3.8/contextlib.py:113: in __enter__\r\n return next(self.gen)\r\n self = \u003ccontextlib._GeneratorContextManager object at 0x7fdf784b4550\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1304: in decoration_helper\r\n arg = exit_stack.enter_context(patching)\r\n args = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842190\u003e,)\r\n exit_stack = \u003ccontextlib.ExitStack object at 0x7fdf784b4d90\u003e\r\n extra_args = []\r\n keywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c4c0\u003e, 'value': '1989-01-02T00:00:00Z'}\r\n patched = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba16160\u003e\r\n patching = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n/usr/lib64/python3.8/contextlib.py:425: in enter_context\r\n result = _cm_type.__enter__(cm)\r\n _cm_type = \u003cclass 'unittest.mock._patch'\u003e\r\n _exit = \u003cfunction _patch.__exit__ at 0x7fdf7c1f51f0\u003e\r\n cm = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n self = \u003ccontextlib.ExitStack object at 0x7fdf784b4d90\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1393: in __enter__\r\n original, local = self.get_original()\r\n autospec = None\r\n kwargs = {}\r\n new = False\r\n new_callable = None\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n spec = None\r\n spec_set = None\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n\r\n def get_original(self):\r\n target = self.getter()\r\n name = self.attribute\r\n\r\n original = DEFAULT\r\n local = False\r\n\r\n try:\r\n original = target.__dict__[name]\r\n except (AttributeError, KeyError):\r\n original = getattr(target, name, DEFAULT)\r\n else:\r\n local = True\r\n\r\n if name in _builtins and isinstance(target, ModuleType):\r\n self.create = True\r\n\r\n if not self.create and original is DEFAULT:\r\n\u003e raise AttributeError(\r\n \"%s does not have the attribute %r\" % (target, name)\r\n )\r\nE AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\n\r\nlocal = False\r\nname = 'DATETIME_HAS_ISODATE'\r\noriginal = sentinel.DEFAULT\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\ntarget = \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1366: AttributeError\r\n____________________________________________________ TestSchemaValidate.test_string_format_datetime_strict_rfc3339[2018-01-02T23:59:59Z] ____________________________________________________\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842220\u003e,)\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c8b0\u003e, 'value': '2018-01-02T23:59:59Z'}\r\n\r\n @wraps(func)\r\n def patched(*args, **keywargs):\r\n\u003e with self.decoration_helper(patched,\r\n args,\r\n keywargs) as (newargs, newkeywargs):\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842220\u003e,)\r\nfunc = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba160d0\u003e\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c8b0\u003e, 'value': '2018-01-02T23:59:59Z'}\r\npatched = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba16160\u003e\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1322:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n/usr/lib64/python3.8/contextlib.py:113: in __enter__\r\n return next(self.gen)\r\n self = \u003ccontextlib._GeneratorContextManager object at 0x7fdf7814ec10\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1304: in decoration_helper\r\n arg = exit_stack.enter_context(patching)\r\n args = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842220\u003e,)\r\n exit_stack = \u003ccontextlib.ExitStack object at 0x7fdf7814ec40\u003e\r\n extra_args = []\r\n keywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c8b0\u003e, 'value': '2018-01-02T23:59:59Z'}\r\n patched = \u003cfunction TestSchemaValidate.test_string_format_datetime_strict_rfc3339 at 0x7fdf7ba16160\u003e\r\n patching = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n/usr/lib64/python3.8/contextlib.py:425: in enter_context\r\n result = _cm_type.__enter__(cm)\r\n _cm_type = \u003cclass 'unittest.mock._patch'\u003e\r\n _exit = \u003cfunction _patch.__exit__ at 0x7fdf7c1f51f0\u003e\r\n cm = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n self = \u003ccontextlib.ExitStack object at 0x7fdf7814ec40\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1393: in __enter__\r\n original, local = self.get_original()\r\n autospec = None\r\n kwargs = {}\r\n new = False\r\n new_callable = None\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n spec = None\r\n spec_set = None\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\n\r\n def get_original(self):\r\n target = self.getter()\r\n name = self.attribute\r\n\r\n original = DEFAULT\r\n local = False\r\n\r\n try:\r\n original = target.__dict__[name]\r\n except (AttributeError, KeyError):\r\n original = getattr(target, name, DEFAULT)\r\n else:\r\n local = True\r\n\r\n if name in _builtins and isinstance(target, ModuleType):\r\n self.create = True\r\n\r\n if not self.create and original is DEFAULT:\r\n\u003e raise AttributeError(\r\n \"%s does not have the attribute %r\" % (target, name)\r\n )\r\nE AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\n\r\nlocal = False\r\nname = 'DATETIME_HAS_ISODATE'\r\noriginal = sentinel.DEFAULT\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b809640\u003e\r\ntarget = \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1366: AttributeError\r\n_______________________________________________________ TestSchemaValidate.test_string_format_datetime_isodate[1989-01-02T00:00:00Z] ________________________________________________________\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b8423d0\u003e,)\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c820\u003e, 'value': '1989-01-02T00:00:00Z'}\r\n\r\n @wraps(func)\r\n def patched(*args, **keywargs):\r\n\u003e with self.decoration_helper(patched,\r\n args,\r\n keywargs) as (newargs, newkeywargs):\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b8423d0\u003e,)\r\nfunc = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba16310\u003e\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c820\u003e, 'value': '1989-01-02T00:00:00Z'}\r\npatched = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba163a0\u003e\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1322:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n/usr/lib64/python3.8/contextlib.py:113: in __enter__\r\n return next(self.gen)\r\n self = \u003ccontextlib._GeneratorContextManager object at 0x7fdf7810c100\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1304: in decoration_helper\r\n arg = exit_stack.enter_context(patching)\r\n args = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b8423d0\u003e,)\r\n exit_stack = \u003ccontextlib.ExitStack object at 0x7fdf7810c940\u003e\r\n extra_args = []\r\n keywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c820\u003e, 'value': '1989-01-02T00:00:00Z'}\r\n patched = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba163a0\u003e\r\n patching = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n/usr/lib64/python3.8/contextlib.py:425: in enter_context\r\n result = _cm_type.__enter__(cm)\r\n _cm_type = \u003cclass 'unittest.mock._patch'\u003e\r\n _exit = \u003cfunction _patch.__exit__ at 0x7fdf7c1f51f0\u003e\r\n cm = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n self = \u003ccontextlib.ExitStack object at 0x7fdf7810c940\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1393: in __enter__\r\n original, local = self.get_original()\r\n autospec = None\r\n kwargs = {}\r\n new = True\r\n new_callable = None\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n spec = None\r\n spec_set = None\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n\r\n def get_original(self):\r\n target = self.getter()\r\n name = self.attribute\r\n\r\n original = DEFAULT\r\n local = False\r\n\r\n try:\r\n original = target.__dict__[name]\r\n except (AttributeError, KeyError):\r\n original = getattr(target, name, DEFAULT)\r\n else:\r\n local = True\r\n\r\n if name in _builtins and isinstance(target, ModuleType):\r\n self.create = True\r\n\r\n if not self.create and original is DEFAULT:\r\n\u003e raise AttributeError(\r\n \"%s does not have the attribute %r\" % (target, name)\r\n )\r\nE AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\n\r\nlocal = False\r\nname = 'DATETIME_HAS_ISODATE'\r\noriginal = sentinel.DEFAULT\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\ntarget = \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1366: AttributeError\r\n_______________________________________________________ TestSchemaValidate.test_string_format_datetime_isodate[2018-01-02T23:59:59Z] ________________________________________________________\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842460\u003e,)\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c310\u003e, 'value': '2018-01-02T23:59:59Z'}\r\n\r\n @wraps(func)\r\n def patched(*args, **keywargs):\r\n\u003e with self.decoration_helper(patched,\r\n args,\r\n keywargs) as (newargs, newkeywargs):\r\n\r\nargs = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842460\u003e,)\r\nfunc = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba16310\u003e\r\nkeywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c310\u003e, 'value': '2018-01-02T23:59:59Z'}\r\npatched = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba163a0\u003e\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1322:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n/usr/lib64/python3.8/contextlib.py:113: in __enter__\r\n return next(self.gen)\r\n self = \u003ccontextlib._GeneratorContextManager object at 0x7fdf781a6fa0\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1304: in decoration_helper\r\n arg = exit_stack.enter_context(patching)\r\n args = (\u003ctest_validate.TestSchemaValidate object at 0x7fdf7b842460\u003e,)\r\n exit_stack = \u003ccontextlib.ExitStack object at 0x7fdf781a6f40\u003e\r\n extra_args = []\r\n keywargs = {'validator_factory': \u003cfunction TestSchemaValidate.validator_factory.\u003clocals\u003e.create_validator at 0x7fdf7831c310\u003e, 'value': '2018-01-02T23:59:59Z'}\r\n patched = \u003cfunction TestSchemaValidate.test_string_format_datetime_isodate at 0x7fdf7ba163a0\u003e\r\n patching = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n/usr/lib64/python3.8/contextlib.py:425: in enter_context\r\n result = _cm_type.__enter__(cm)\r\n _cm_type = \u003cclass 'unittest.mock._patch'\u003e\r\n _exit = \u003cfunction _patch.__exit__ at 0x7fdf7c1f51f0\u003e\r\n cm = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n self = \u003ccontextlib.ExitStack object at 0x7fdf781a6f40\u003e\r\n/usr/lib64/python3.8/unittest/mock.py:1393: in __enter__\r\n original, local = self.get_original()\r\n autospec = None\r\n kwargs = {}\r\n new = True\r\n new_callable = None\r\n self = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n spec = None\r\n spec_set = None\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\n\r\n def get_original(self):\r\n target = self.getter()\r\n name = self.attribute\r\n\r\n original = DEFAULT\r\n local = False\r\n\r\n try:\r\n original = target.__dict__[name]\r\n except (AttributeError, KeyError):\r\n original = getattr(target, name, DEFAULT)\r\n else:\r\n local = True\r\n\r\n if name in _builtins and isinstance(target, ModuleType):\r\n self.create = True\r\n\r\n if not self.create and original is DEFAULT:\r\n\u003e raise AttributeError(\r\n \"%s does not have the attribute %r\" % (target, name)\r\n )\r\nE AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\n\r\nlocal = False\r\nname = 'DATETIME_HAS_ISODATE'\r\noriginal = sentinel.DEFAULT\r\nself = \u003cunittest.mock._patch object at 0x7fdf7b9aa460\u003e\r\ntarget = \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e\r\n\r\n/usr/lib64/python3.8/unittest/mock.py:1366: AttributeError\r\n===================================================================================== warnings summary ======================================================================================\r\ntests/integration/contrib/django/test_django_project.py::TestPetListView::test_get_no_required_param\r\n /usr/lib/python3.8/site-packages/django/conf/__init__.py:229: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale.\r\n warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning)\r\n\r\ntests/integration/contrib/django/test_django_project.py: 96 warnings\r\ntests/integration/contrib/falcon/test_falcon_project.py: 78 warnings\r\ntests/integration/contrib/flask/test_flask_decorator.py: 2 warnings\r\ntests/integration/contrib/flask/test_flask_validator.py: 5 warnings\r\ntests/integration/contrib/flask/test_flask_views.py: 3 warnings\r\ntests/integration/contrib/requests/test_requests_validation.py: 10 warnings\r\ntests/integration/contrib/starlette/test_starlette_validation.py: 5 warnings\r\ntests/integration/contrib/werkzeug/test_werkzeug_validation.py: 10 warnings\r\ntests/integration/validation/test_petstore.py: 146 warnings\r\ntests/integration/validation/test_read_only_write_only.py: 5 warnings\r\ntests/integration/validation/test_security_override.py: 3 warnings\r\ntests/integration/validation/test_validators.py: 51 warnings\r\ntests/unit/unmarshalling/test_unmarshal.py: 4 warnings\r\ntests/unit/unmarshalling/test_validate.py: 197 warnings\r\n /usr/lib/python3.8/site-packages/openapi_schema_validator/validators.py:120: DeprecationWarning: write property is deprecated. Use OAS30WriteValidator instead.\r\n warnings.warn(\r\n\r\ntests/integration/contrib/django/test_django_project.py: 61 warnings\r\ntests/integration/contrib/falcon/test_falcon_project.py: 61 warnings\r\ntests/integration/contrib/flask/test_flask_decorator.py: 5 warnings\r\ntests/integration/contrib/flask/test_flask_views.py: 8 warnings\r\ntests/integration/contrib/requests/test_requests_validation.py: 4 warnings\r\ntests/integration/contrib/starlette/test_starlette_validation.py: 4 warnings\r\ntests/integration/contrib/werkzeug/test_werkzeug_validation.py: 4 warnings\r\ntests/integration/validation/test_petstore.py: 161 warnings\r\ntests/integration/validation/test_read_only_write_only.py: 5 warnings\r\ntests/integration/validation/test_validators.py: 20 warnings\r\ntests/unit/unmarshalling/test_unmarshal.py: 25 warnings\r\n /usr/lib/python3.8/site-packages/openapi_schema_validator/validators.py:113: DeprecationWarning: read property is deprecated. Use OAS30ReadValidator instead.\r\n warnings.warn(\r\n\r\ntests/integration/contrib/requests/test_requests_validation.py::TestRequestsOpenAPIValidation::test_response_validator_path_pattern\r\n /usr/lib/python3.8/site-packages/responses/__init__.py:421: DeprecationWarning: Argument 'match_querystring' is deprecated. Use 'responses.matchers.query_param_matcher' or 'responses.matchers.query_string_matcher'\r\n warn(\r\n\r\ntests/unit/unmarshalling/test_unmarshal.py::TestOAS30SchemaUnmarshallerUnmarshal::test_schema_custom_format_invalid\r\ntests/unit/unmarshalling/test_unmarshal.py::TestOAS30SchemaUnmarshallerCall::test_string_format_custom\r\ntests/unit/unmarshalling/test_unmarshal.py::TestOAS30SchemaUnmarshallerCall::test_string_format_custom_value_error\r\n /home/tkloczko/rpmbuild/BUILDROOT/python-openapi-core-0.16.5-3.fc35.x86_64/usr/lib/python3.8/site-packages/openapi_core/unmarshalling/schemas/formatters.py:28: DeprecationWarning: Unmarshal method is deprecated. Rename unmarshal method to format instead.\r\n warnings.warn(\r\n\r\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\r\n-------------------------------------------------- generated xml file: /home/tkloczko/rpmbuild/BUILD/openapi-core-0.16.5/reports/junit.xml --------------------------------------------------\r\n================================================================================== short test summary info ==================================================================================\r\nXFAIL tests/unit/templating/test_paths_finders.py::TestOperationSimpleServerServerNotFound::test_raises - returns default server\r\nXFAIL tests/unit/templating/test_paths_finders.py::TestPathSimpleServerServerNotFound::test_raises - returns default server\r\nXFAIL tests/unit/templating/test_paths_finders.py::TestOperationVariableServerServerNotFound::test_raises - returns default server\r\nXFAIL tests/unit/templating/test_paths_finders.py::TestPathVariableServerServerNotFound::test_raises - returns default server\r\nXFAIL tests/unit/unmarshalling/test_unmarshal.py::TestOAS30SchemaUnmarshallerCall::test_null_not_supported\r\nXPASS tests/unit/templating/test_paths_finders.py::TestSpecSimpleServerServerNotFound::test_raises returns default server\r\nXPASS tests/unit/templating/test_paths_finders.py::TestSpecVariableServerServerNotFound::test_raises returns default server\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_date_invalid[true] - Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_uuid_invalid[true0] - Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_invalid[true0] - Failed: DID NOT RAISE \u003cclass 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'\u003e\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[1989-01-02T00:00:00Z] - AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[2018-01-02T23:59:59Z] - AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[1989-01-02T00:00:00Z] - AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\nFAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[2018-01-02T23:59:59Z] - AttributeError: \u003cmodule 'openapi_schema_validator._format' from '/usr/lib/python3.8/site-packages/openapi_schema_validator/_format.py'\u003e does not have the attribute 'DATETIME_HAS_ISODATE'\r\n============================================================= 7 failed, 728 passed, 5 xfailed, 2 xpassed, 978 warnings in 5.12s =============================================================\r\n```\r\n\u003c/details\u003e\r\n\r\nHere is list of installed modules in build env\r\n\u003cdetails\u003e\r\n\r\n```console\r\nPackage Version\r\n----------------------------- -----------------\r\nalabaster 0.7.13\r\nanyio 3.6.2\r\nasgiref 3.4.1\r\nattrs 22.2.0\r\nBabel 2.12.1\r\nbackports.zoneinfo 0.2.1\r\nbuild 0.9.0\r\ncharset-normalizer 3.0.1\r\nclick 8.1.3\r\ndistro 1.8.0\r\nDjango 4.0.4\r\ndjangorestframework 3.14.0\r\ndocutils 0.19\r\nexceptiongroup 1.0.0\r\nfalcon 3.1.1\r\nflake8 5.0.4\r\nFlask 2.2.2\r\ngpg 1.18.0-unknown\r\nidna 3.4\r\nimagesize 1.4.1\r\nimportlib-metadata 6.0.0\r\nimportlib-resources 5.12.0\r\niniconfig 2.0.0\r\nisodate 0.6.1\r\nitsdangerous 2.1.2\r\nJinja2 3.1.2\r\njsonschema 4.17.3\r\njsonschema-spec 0.1.3\r\nlazy-object-proxy 1.9.0\r\nlibcomps 0.1.19\r\nMarkupSafe 2.1.2\r\nmccabe 0.7.0\r\nmore-itertools 9.1.0\r\nopenapi-schema-validator 0.4.3\r\nopenapi-spec-validator 0.5.5\r\npackaging 23.0\r\nparse 1.19.0\r\npathable 0.4.3\r\npep517 0.13.0\r\npip 22.3.1\r\npkgutil_resolve_name 1.3.10\r\npluggy 1.0.0\r\npoetry-core 1.5.1\r\npycodestyle 2.9.1\r\npyflakes 2.5.0\r\nPygments 2.14.0\r\npyrsistent 0.19.3\r\npytest 7.2.1\r\npytest-flake8 1.1.1\r\npython-dateutil 2.8.2\r\npytz 2022.4\r\nPyYAML 6.0\r\nrequests 2.28.2\r\nresponses 0.22.0\r\nrfc3339-validator 0.1.4\r\nrpm 4.17.0\r\nsix 1.16.0\r\nsniffio 1.2.0\r\nsnowballstemmer 2.2.0\r\nSphinx 6.1.3\r\nsphinxcontrib-applehelp 1.0.4\r\nsphinxcontrib-devhelp 1.0.2.dev20230202\r\nsphinxcontrib-htmlhelp 2.0.0\r\nsphinxcontrib-jsmath 1.0.1.dev20230128\r\nsphinxcontrib-qthelp 1.0.3.dev20230128\r\nsphinxcontrib-serializinghtml 1.1.5\r\nsqlparse 0.4.2\r\nstarlette 0.20.4\r\nstrict-rfc3339 0.7\r\ntomli 2.0.1\r\ntomli_w 1.0.0\r\ntyping_extensions 4.4.0\r\nurllib3 1.26.12\r\nWebOb 1.8.7\r\nWerkzeug 2.2.2\r\nwheel 0.38.4\r\nzipp 3.15.0\r\n```\r\n\u003c/details\u003e\r\n","author":{"url":"https://github.com/kloczek","@type":"Person","name":"kloczek"},"datePublished":"2023-03-01T15:58:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/525/openapi-core/issues/525"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:02b5a9ca-d33b-fe1f-53f7-6db8c2cc405a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9636:232EC3:7B71BC:AE352B:6978BDDD |
| html-safe-nonce | 2996cc4dccf5a3f2765d46dfb24fb6d270c8140a3befc71adc9afb2331f29851 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjM2OjIzMkVDMzo3QjcxQkM6QUUzNTJCOjY5NzhCREREIiwidmlzaXRvcl9pZCI6IjQ1NzA0MDI3NDMwMDgxNDg5NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4216f84565a1fdb703802235455ffe502dce1b28751d312ddf6330db7800888d |
| hovercard-subject-tag | issue:1605236166 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-openapi/openapi-core/525/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69882e024054f27abab6563fefa18b2bed69fea1c6b61859ffcbbd830b7a548b/python-openapi/openapi-core/issues/525 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69882e024054f27abab6563fefa18b2bed69fea1c6b61859ffcbbd830b7a548b/python-openapi/openapi-core/issues/525 |
| og:image:alt | I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. python3 -sBm build -w --no-isolation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kloczek |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-openapi/openapi-core git https://github.com/python-openapi/openapi-core.git |
| octolytics-dimension-user_id | 126442889 |
| octolytics-dimension-user_login | python-openapi |
| octolytics-dimension-repository_id | 104200746 |
| octolytics-dimension-repository_nwo | python-openapi/openapi-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 104200746 |
| octolytics-dimension-repository_network_root_nwo | python-openapi/openapi-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9520342ca7ead2f1a011aa96eaff82fc054a4970 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width