=========================== short test summary info ============================
FAILED tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py::test_excluding_fields_in_endpoints
FAILED tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py::test_adding_fields_in_endpoints
FAILED tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py::test_adding_fields_in_endpoints2
FAILED tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py::test_excluding_property_field_in_endpoints2
FAILED tests/test_fastapi/test_binary_fields.py::test_read_main - httpx.Conne...
FAILED tests/test_fastapi/test_choices_schema.py::test_all_endpoints - httpx....
FAILED tests/test_fastapi/test_docs_with_multiple_relations_to_one.py::test_all_endpoints
FAILED tests/test_fastapi/test_excludes_with_get_pydantic.py::test_read_main FAILED tests/test_fastapi/test_excluding_fields.py::test_all_endpoints - http...
FAILED tests/test_fastapi/test_extra_ignore_parameter.py::test_extra_parameters_in_request
FAILED tests/test_fastapi/test_fastapi_docs.py::test_all_endpoints - httpx.Co...
FAILED tests/test_fastapi/test_fastapi_usage.py::test_read_main - httpx.Conne...
FAILED tests/test_fastapi/test_inheritance_concrete_fastapi.py::test_read_main
FAILED tests/test_fastapi/test_inheritance_concrete_fastapi.py::test_inheritance_with_relation
FAILED tests/test_fastapi/test_inheritance_concrete_fastapi.py::test_inheritance_with_m2m_relation
FAILED tests/test_fastapi/test_inheritance_mixins_fastapi.py::test_read_main FAILED tests/test_fastapi/test_json_field_fastapi.py::test_read_main - httpx....
FAILED tests/test_fastapi/test_m2m_forwardref.py::test_payload - httpx.Connec...
FAILED tests/test_fastapi/test_more_reallife_fastapi.py::test_all_endpoints FAILED tests/test_fastapi/test_nested_saving.py::test_saving_related_in_fastapi
FAILED tests/test_fastapi/test_recursion_error.py::test_quiz_creation - httpx...
FAILED tests/test_fastapi/test_relations_with_nested_defaults.py::test_related_with_defaults
FAILED tests/test_fastapi/test_skip_reverse_models.py::test_queries - httpx.C...
FAILED tests/test_fastapi/test_wekref_exclusion.py::test_endpoints - httpx.Co...
========= 24 failed, 422 passed, 1 deselected, 103 warnings in 22.46s ==========
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_ormar/build; python3.12 -m pytest --asyncio-mode=auto -k "not test_weakref_init"
I: pybuild base:305: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_ormar/build; python3.11 -m pytest --asyncio-mode=auto -k "not test_weakref_init"
============================= test session starts ==============================
platform linux -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_ormar/build
plugins: tornasync-0.6.0.post2, anyio-4.2.0, asyncio-0.20.3
asyncio: mode=Mode.AUTO
collected 447 items / 1 deselected / 446 selected
tests/test_deferred/test_forward_cross_refs.py .. [ 0%]
tests/test_deferred/test_forward_refs.py ....... [ 2%]
tests/test_deferred/test_more_same_table_joins.py ... [ 2%]
tests/test_deferred/test_same_table_joins.py ... [ 3%]
tests/test_encryption/test_encrypted_columns.py ......... [ 5%]
tests/test_exclude_include_dict/test_complex_relation_tree_performance.py . [ 5%]
[ 5%]
tests/test_exclude_include_dict/test_dumping_model_to_dict.py ...... [ 6%]
tests/test_exclude_include_dict/test_excludable_items.py ........ [ 8%]
tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py FFFF [ 9%]
[ 9%]
tests/test_exclude_include_dict/test_excluding_fields_with_default.py . [ 9%]
tests/test_exclude_include_dict/test_excluding_subset_of_columns.py . [ 10%]
tests/test_exclude_include_dict/test_pydantic_dict_params.py ... [ 10%]
tests/test_fastapi/test_binary_fields.py F. [ 11%]
tests/test_fastapi/test_choices_schema.py F.. [ 11%]
tests/test_fastapi/test_docs_with_multiple_relations_to_one.py F [ 12%]
tests/test_fastapi/test_enum_schema.py . [ 12%]
tests/test_fastapi/test_excludes_with_get_pydantic.py F [ 12%]
tests/test_fastapi/test_excluding_fields.py F [ 12%]
tests/test_fastapi/test_extra_ignore_parameter.py F [ 13%]
tests/test_fastapi/test_fastapi_docs.py F.. [ 13%]
tests/test_fastapi/test_fastapi_usage.py F [ 13%]
tests/test_fastapi/test_inheritance_concrete_fastapi.py FFF [ 14%]
tests/test_fastapi/test_inheritance_mixins_fastapi.py F [ 14%]
tests/test_fastapi/test_json_field_fastapi.py ...F [ 15%]
tests/test_fastapi/test_m2m_forwardref.py F [ 15%]
tests/test_fastapi/test_more_reallife_fastapi.py F [ 16%]
tests/test_fastapi/test_nested_saving.py F [ 16%]
tests/test_fastapi/test_recursion_error.py F [ 16%]
tests/test_fastapi/test_relations_with_nested_defaults.py F [ 16%]
tests/test_fastapi/test_schema_not_allowed_params.py . [ 17%]
tests/test_fastapi/test_skip_reverse_models.py F [ 17%]
tests/test_fastapi/test_wekref_exclusion.py F [ 17%]
tests/test_inheritance_and_pydantic_generation/test_excluding_parent_fields_inheritance.py . [ 17%]
... [ 18%]
tests/test_inheritance_and_pydantic_generation/test_geting_pydantic_models.py . [ 18%]
............ [ 21%]
tests/test_inheritance_and_pydantic_generation/test_inheritance_concrete.py . [ 21%]
........... [ 23%]
tests/test_inheritance_and_pydantic_generation/test_inheritance_mixins.py . [ 24%]
.. [ 24%]
tests/test_inheritance_and_pydantic_generation/test_inheritance_of_property_fields.py . [ 24%]
[ 24%]
tests/test_inheritance_and_pydantic_generation/test_inheritance_with_default.py . [ 25%]
. [ 25%]
tests/test_inheritance_and_pydantic_generation/test_inherited_class_is_not_abstract_by_default.py . [ 25%]
[ 25%]
tests/test_inheritance_and_pydantic_generation/test_nested_models_pydantic.py . [ 25%]
. [ 26%]
tests/test_inheritance_and_pydantic_generation/test_pydantic_fields_order.py . [ 26%]
[ 26%]
tests/test_inheritance_and_pydantic_generation/test_validators_are_inherited.py . [ 26%]
. [ 26%]
tests/test_inheritance_and_pydantic_generation/test_validators_in_generated_pydantic.py . [ 26%]
. [ 27%]
tests/test_meta_constraints/test_check_constraints.py . [ 27%]
tests/test_meta_constraints/test_index_constraints.py .. [ 27%]
tests/test_meta_constraints/test_unique_constraints.py . [ 28%]
tests/test_model_definition/pks_and_fks/test_non_integer_pkey.py .. [ 28%]
tests/test_model_definition/pks_and_fks/test_saving_string_pks.py . [ 28%]
tests/test_model_definition/pks_and_fks/test_uuid_fks.py . [ 28%]
tests/test_model_definition/test_aliases.py .... [ 29%]
tests/test_model_definition/test_columns.py ...... [ 31%]
tests/test_model_definition/test_create_uses_init_for_consistency.py . [ 31%]
tests/test_model_definition/test_dates_with_timezone.py ..... [ 32%]
tests/test_model_definition/test_equality_and_hash.py ... [ 33%]
tests/test_model_definition/test_extra_ignore_parameter.py . [ 33%]
tests/test_model_definition/test_fields_access.py ...................... [ 38%]
[ 38%]
tests/test_model_definition/test_foreign_key_value_used_for_related_model.py . [ 38%]
. [ 38%]
tests/test_model_definition/test_iterate.py ............ [ 41%]
tests/test_model_definition/test_model_construct.py ... [ 42%]
tests/test_model_definition/test_model_definition.py ................ [ 45%]
tests/test_model_definition/test_models.py ....................... [ 50%]
tests/test_model_definition/test_models_are_pickable.py . [ 51%]
tests/test_model_definition/test_overwriting_pydantic_field_type.py .. [ 51%]
tests/test_model_definition/test_overwriting_sql_nullable.py . [ 51%]
tests/test_model_definition/test_pk_field_is_always_not_null.py . [ 52%]
tests/test_model_definition/test_properties.py .. [ 52%]
tests/test_model_definition/test_pydantic_fields.py ... [ 53%]
tests/test_model_definition/test_pydantic_only_fields.py . [ 53%]
tests/test_model_definition/test_pydantic_private_attributes.py . [ 53%]
tests/test_model_definition/test_save_status.py ........ [ 55%]
tests/test_model_definition/test_saving_nullable_fields.py . [ 55%]
tests/test_model_definition/test_server_default.py .. [ 56%]
tests/test_model_definition/test_setting_comments_in_db.py . [ 56%]
tests/test_model_methods/test_excludes_in_load_all.py .. [ 56%]
tests/test_model_methods/test_load_all.py ..... [ 57%]
tests/test_model_methods/test_populate_default_values.py . [ 58%]
tests/test_model_methods/test_save_related.py .... [ 58%]
tests/test_model_methods/test_save_related_from_dict.py ....... [ 60%]
tests/test_model_methods/test_save_related_uuid.py . [ 60%]
tests/test_model_methods/test_update.py .. [ 61%]
tests/test_model_methods/test_upsert.py . [ 61%]
tests/test_ordering/test_default_model_order.py ... [ 62%]
tests/test_ordering/test_default_relation_order.py .... [ 63%]
tests/test_ordering/test_default_through_relation_order.py .. [ 63%]
tests/test_ordering/test_proper_order_of_sorting_apply.py . [ 63%]
tests/test_queries/test_adding_related.py . [ 63%]
tests/test_queries/test_aggr_functions.py ...... [ 65%]
tests/test_queries/test_deep_relations_select_all.py . [ 65%]
tests/test_queries/test_filter_groups.py ........ [ 67%]
tests/test_queries/test_indirect_relations_to_self.py . [ 67%]
tests/test_queries/test_isnull_filter.py .. [ 67%]
tests/test_queries/test_nested_reverse_relations.py . [ 68%]
tests/test_queries/test_non_relation_fields_not_merged.py . [ 68%]
tests/test_queries/test_or_filters.py . [ 68%]
tests/test_queries/test_order_by.py .... [ 69%]
tests/test_queries/test_pagination.py .... [ 70%]
tests/test_queries/test_queryproxy_on_m2m_models.py .. [ 70%]
tests/test_queries/test_queryset_level_methods.py .............. [ 73%]
tests/test_queries/test_quoting_table_names_in_on_join_clause.py . [ 74%]
tests/test_queries/test_reserved_sql_keywords_escaped.py .. [ 74%]
tests/test_queries/test_reverse_fk_queryset.py ..... [ 75%]
tests/test_queries/test_selecting_subset_of_columns.py .. [ 76%]
tests/test_queries/test_values_and_values_list.py ................ [ 79%]
tests/test_relations/test_cascades.py .... [ 80%]
tests/test_relations/test_customizing_through_model_relation_names.py .. [ 81%]
[ 81%]
tests/test_relations/test_database_fk_creation.py ... [ 81%]
tests/test_relations/test_foreign_keys.py ............... [ 85%]
tests/test_relations/test_m2m_through_fields.py ............. [ 88%]
tests/test_relations/test_many_to_many.py ......... [ 90%]
tests/test_relations/test_postgress_select_related_with_limit.py . [ 90%]
tests/test_relations/test_prefetch_related.py ..... [ 91%]
tests/test_relations/test_prefetch_related_multiple_models_relation.py . [ 91%]
[ 91%]
tests/test_relations/test_python_style_relations.py . [ 91%]
tests/test_relations/test_relations_default_exception.py .. [ 92%]
tests/test_relations/test_saving_related.py .. [ 92%]
tests/test_relations/test_select_related_with_limit.py . [ 93%]
tests/test_relations/test_select_related_with_m2m_and_pk_name_set.py .. [ 93%]
tests/test_relations/test_selecting_proper_table_prefix.py . [ 93%]
tests/test_relations/test_skipping_reverse.py ..... [ 94%]
tests/test_relations/test_through_relations_fail.py . [ 95%]
tests/test_signals/test_signals.py .......... [ 97%]
tests/test_signals/test_signals_for_relations.py . [ 97%]
tests/test_types.py . [ 97%]
tests/test_utils/test_models_helpers.py . [ 97%]
tests/test_utils/test_queryset_utils.py ......... [100%]
=================================== FAILURES ===================================
______________________ test_excluding_fields_in_endpoints ______________________
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
/usr/lib/python3/dist-packages/httpx/_transports/default.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request
resp = await self._pool.handle_async_request(req) /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request
raise exc from None /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request
response = await connection.handle_async_request( /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:207: in handle_async_request
return await self._connection.handle_async_request(proxy_request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:99: in handle_async_request
raise exc /usr/lib/python3/dist-packages/httpcore/_async/connection.py:76: in handle_async_request
stream = await self._connect(request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:122: in _connect
stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/dist-packages/httpcore/_backends/auto.py:30: in connect_tcp
return await self._backend.connect_tcp( /usr/lib/python3/dist-packages/httpcore/_backends/anyio.py:112: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
map = {<class 'TimeoutError'>: <class 'httpcore.ConnectTimeout'>, <class 'OSError'>: <class 'httpcore.ConnectError'>, <class 'anyio.BrokenResourceError'>: <class 'httpcore.ConnectError'>}
@contextlib.contextmanager
def map_exceptions(map: ExceptionMapping) -> Iterator[None]:
try:
yield
except Exception as exc: # noqa: PIE786
for from_exc, to_exc in map.items():
if isinstance(exc, from_exc):
raise to_exc(exc) from excE httpcore.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpcore/_exceptions.py:14: ConnectError
The above exception was the direct cause of the following exception:
@pytest.mark.asyncio
async def test_excluding_fields_in_endpoints():
client = AsyncClient(app=app, base_url="http://testserver")
async with client as client, LifespanManager(app):
user = {
"email": "test@domain.com",
"password": "^*^%A*DA*IAAA",
"first_name": "John",
"last_name": "Doe",
}
response = await client.post("/users/", json=user)
tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_client.py:1892: in post
return await self.request( /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
/usr/lib/python3/dist-packages/httpx/_client.py:1661: in send
response = await self._send_handling_auth( /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth
response = await self._send_handling_redirects( /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects
response = await self._send_single_request(request) /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request
response = await transport.handle_async_request(request) /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request
with map_httpcore_exceptions():
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
except Exception as exc:
mapped_exc = None
for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
if not isinstance(exc, from_exc):
continue
# We want to map to the most specific exception we can find.
# Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to
# `httpx.ReadTimeout`, not just `httpx.TimeoutException`.
if mapped_exc is None or issubclass(to_exc, mapped_exc):
mapped_exc = to_exc
if mapped_exc is None: # pragma: no cover
raise
message = str(exc)
raise mapped_exc(message) from excE httpx.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ConnectError _______________________ test_adding_fields_in_endpoints ________________________
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
/usr/lib/python3/dist-packages/httpx/_transports/default.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request
resp = await self._pool.handle_async_request(req) /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request
raise exc from None /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request
response = await connection.handle_async_request( /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:207: in handle_async_request
return await self._connection.handle_async_request(proxy_request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:99: in handle_async_request
raise exc /usr/lib/python3/dist-packages/httpcore/_async/connection.py:76: in handle_async_request
stream = await self._connect(request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:122: in _connect
stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/dist-packages/httpcore/_backends/auto.py:30: in connect_tcp
return await self._backend.connect_tcp( /usr/lib/python3/dist-packages/httpcore/_backends/anyio.py:112: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
map = {<class 'TimeoutError'>: <class 'httpcore.ConnectTimeout'>, <class 'OSError'>: <class 'httpcore.ConnectError'>, <class 'anyio.BrokenResourceError'>: <class 'httpcore.ConnectError'>}
@contextlib.contextmanager
def map_exceptions(map: ExceptionMapping) -> Iterator[None]:
try:
yield
except Exception as exc: # noqa: PIE786
for from_exc, to_exc in map.items():
if isinstance(exc, from_exc):
raise to_exc(exc) from excE httpcore.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpcore/_exceptions.py:14: ConnectError
The above exception was the direct cause of the following exception:
@pytest.mark.asyncio
async def test_adding_fields_in_endpoints():
client = AsyncClient(app=app, base_url="http://testserver")
async with client as client, LifespanManager(app):
user3 = {"last_name": "Test", "full_name": "deleted"}
response = await client.post("/random/", json=user3)
tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py:236:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_client.py:1892: in post
return await self.request( /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
/usr/lib/python3/dist-packages/httpx/_client.py:1661: in send
response = await self._send_handling_auth( /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth
response = await self._send_handling_redirects( /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects
response = await self._send_single_request(request) /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request
response = await transport.handle_async_request(request) /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request
with map_httpcore_exceptions():
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
except Exception as exc:
mapped_exc = None
for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
if not isinstance(exc, from_exc):
continue
# We want to map to the most specific exception we can find.
# Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to
# `httpx.ReadTimeout`, not just `httpx.TimeoutException`.
if mapped_exc is None or issubclass(to_exc, mapped_exc):
mapped_exc = to_exc
if mapped_exc is None: # pragma: no cover
raise
message = str(exc)
raise mapped_exc(message) from excE httpx.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ConnectError _______________________ test_adding_fields_in_endpoints2 _______________________
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
/usr/lib/python3/dist-packages/httpx/_transports/default.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request
resp = await self._pool.handle_async_request(req) /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request
raise exc from None /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request
response = await connection.handle_async_request( /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:207: in handle_async_request
return await self._connection.handle_async_request(proxy_request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:99: in handle_async_request
raise exc /usr/lib/python3/dist-packages/httpcore/_async/connection.py:76: in handle_async_request
stream = await self._connect(request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:122: in _connect
stream = await self._network_backend.connect_tcp(**kwargs) /usr/lib/python3/dist-packages/httpcore/_backends/auto.py:30: in connect_tcp
return await self._backend.connect_tcp( /usr/lib/python3/dist-packages/httpcore/_backends/anyio.py:112: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
map = {<class 'TimeoutError'>: <class 'httpcore.ConnectTimeout'>, <class 'OSError'>: <class 'httpcore.ConnectError'>, <class 'anyio.BrokenResourceError'>: <class 'httpcore.ConnectError'>}
@contextlib.contextmanager
def map_exceptions(map: ExceptionMapping) -> Iterator[None]:
try:
yield
except Exception as exc: # noqa: PIE786
for from_exc, to_exc in map.items():
if isinstance(exc, from_exc):
raise to_exc(exc) from excE httpcore.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpcore/_exceptions.py:14: ConnectError
The above exception was the direct cause of the following exception:
@pytest.mark.asyncio
async def test_adding_fields_in_endpoints2():
client = AsyncClient(app=app, base_url="http://testserver")
async with client as client, LifespanManager(app):
user3 = {"last_name": "Test"}
response = await client.post("/random2/", json=user3)
tests/test_exclude_include_dict/test_excluding_fields_in_fastapi.py:265:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_client.py:1892: in post
return await self.request( /usr/lib/python3/dist-packages/httpx/_client.py:1574: in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
/usr/lib/python3/dist-packages/httpx/_client.py:1661: in send
response = await self._send_handling_auth( /usr/lib/python3/dist-packages/httpx/_client.py:1689: in _send_handling_auth
response = await self._send_handling_redirects( /usr/lib/python3/dist-packages/httpx/_client.py:1726: in _send_handling_redirects
response = await self._send_single_request(request) /usr/lib/python3/dist-packages/httpx/_client.py:1763: in _send_single_request
response = await transport.handle_async_request(request) /usr/lib/python3/dist-packages/httpx/_transports/default.py:372: in handle_async_request
with map_httpcore_exceptions():
/usr/lib/python3.11/contextlib.py:158: in __exit__
self.gen.throw(typ, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
except Exception as exc:
mapped_exc = None
for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
if not isinstance(exc, from_exc):
continue
# We want to map to the most specific exception we can find.
# Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to
# `httpx.ReadTimeout`, not just `httpx.TimeoutException`.
if mapped_exc is None or issubclass(to_exc, mapped_exc):
mapped_exc = to_exc
if mapped_exc is None: # pragma: no cover
raise
message = str(exc)
raise mapped_exc(message) from excE httpx.ConnectError: All connection attempts failed
/usr/lib/python3/dist-packages/httpx/_transports/default.py:86: ConnectError _________________ test_excluding_property_field_in_endpoints2 __________________
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
/usr/lib/python3/dist-packages/httpx/_transports/default.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/httpx/_transports/default.py:373: in handle_async_request
resp = await self._pool.handle_async_request(req) /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:216: in handle_async_request
raise exc from None /usr/lib/python3/dist-packages/httpcore/_async/connection_pool.py:196: in handle_async_request
response = await connection.handle_async_request( /usr/lib/python3/dist-packages/httpcore/_async/http_proxy.py:207: in handle_async_request
return await self._connection.handle_async_request(proxy_request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:99: in handle_async_request
raise exc /usr/lib/python3/dist-packages/httpcore/_async/connection.py:76: in handle_async_request
stream = await self._connect(request) /usr/lib/python3/dist-packages/httpcore/_async/connection.py:122: in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 12:01:39 |
Calls: | 6,666 |
Files: | 12,214 |
Messages: | 5,336,445 |