tigrbl_tests 0.3.9.dev4__tar.gz → 0.3.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/PKG-INFO +2 -2
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/README.md +1 -1
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/pyproject.toml +1 -1
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mountable_lens_uvicorn.py +1 -1
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_v3_default_rpc_ops.py +115 -0
- tigrbl_tests-0.3.10/tests/request/test_request_asgi_scope_compat.py +41 -0
- tigrbl_tests-0.3.10/tests/unit/test_jsonrpc_openrpc.py +122 -0
- tigrbl_tests-0.3.10/tests/unit/test_openapi_openrpc_schema_separation.py +71 -0
- tigrbl_tests-0.3.10/tests/unit/test_system_docs_builders.py +122 -0
- tigrbl_tests-0.3.9.dev4/tests/unit/test_jsonrpc_openrpc.py +0 -49
- tigrbl_tests-0.3.9.dev4/tests/unit/test_system_docs_builders.py +0 -24
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/LICENSE +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/conftest.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/hooks/test_hook_ctx_phase_validation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_acronym_route_name.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_allow_anon.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_apikey_generation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_authn_provider_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_bindings_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_bindings_modules.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_bulk_docs_client.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_core_access.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_engine_install_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_engine_resolver_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_error_mappings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_field_spec_effects.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_header_io_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_healthz_methodz_hookz.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_hook_ctx_v3_i9n.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_hook_lifecycle.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_iospec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_iospec_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_jsonrpc_batch_behavior.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_key_digest_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_list_filters_optional.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mixins.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mountable_favicon_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mountable_openapi_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mountable_openrpc_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_mountable_swagger_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_nested_path_schema_and_rpc.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_nested_routing_depth.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_op_ctx_alias_examples.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_op_ctx_behavior.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_op_ctx_core_crud_order.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_openapi_clear_response_schema.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_openapi_schema_examples_presence.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_opspec_effects_i9n_test.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_owner_tenant_policy.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_request_extras.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_request_extras_provider.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_response_extras_provider.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_rest_fallback_serialization.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_rest_row_serialization.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_rest_rpc_parity_v3.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_row_result_serialization.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_schema.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_schema_ctx_attributes_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_schema_ctx_op_ctx_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_schema_ctx_spec_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_sqlite_attachments.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_storage_spec_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_symmetry_parity.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_api_app_usage_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_api_usage_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_api_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_app_include_api_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_app_multi_api_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_app_usage_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_tigrbl_app_uvicorn.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_v3_bulk_rest_endpoints.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_v3_default_rest_ops.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_v3_opspec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_verb_alias_policy.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/uvicorn_utils.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/mount/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/mount/test_mount_favico.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/parity/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/parity/test_stdapi_openapi_docs.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/parity/test_stdapi_primitives.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/parity/test_stdapi_routing.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/perf/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/perf/test_collect_caching.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/perf/test_hookz_performance.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/perf/test_methodz_performance.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/request/test_request_dot_notation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/request/test_request_response_conveniences.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/request/test_request_transport_convenience_dot_notation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/requests/test_request_json_modes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/response/test_response_dot_notation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/response/test_response_transport_convenience_dot_notation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/security/test_dot_notation_schemes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/security/test_schemes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/__init__.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_alias_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_engine_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_hook_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_op_alias_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_op_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_response_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/decorators/test_schema_ctx_bindings.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/response_utils.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_emit_paired_post.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_emit_paired_pre.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_emit_readtime_alias.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_out_masking.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_refresh_demand.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_resolve_assemble.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_resolve_paired_gen.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_schema_collect_in.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_schema_collect_out.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_storage_to_stored.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_wire_build_in.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_wire_build_out.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_wire_dump.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/atoms/test_wire_validate_in.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/runtime/test_events_phases.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_acol_vcol_knobs.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_alias_ctx_op_alias_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_alias_ctx_op_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_api_level_set_auth.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_app_model_defaults.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_app_reexport.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_base_columnspec_inheritance.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_base_facade_initialize.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_build_list_params_spec_model.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_bulk_body_annotation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_bulk_response_schema.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_colspec_map_isolation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_column_collect_mixins.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_column_rest_rpc_results.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_column_table_orm_binding.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_config_dataclass_none.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_core_crud_bulk_ops.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_core_crud_default_ops.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_core_crud_methods.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_core_wrap_memoization.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_db_dependency.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_decorator_and_collect.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_default_tags.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_install_api.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_install_app.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_install_op.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_install_table.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_spec_and_shortcuts.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_engine_usage_levels.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_field_spec_attrs.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_file_response.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_get_schema.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_handler_step_qualname.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_hook_ctx_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_hook_ctx_binding.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_hookz_empty_phase.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_hybrid_session_run_sync.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_in_tx.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_include_model_columns_namespace.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_include_models_base_prefix.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_initialize_async_task.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_initialize_cross_ddl.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_initialize_mixed_engines.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_initialize_task_schedule.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_io_spec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_iospec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_iospec_effects.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_jsonrpc_id_example.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_jsonrpc_router_default_tag.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_kernel_invoke_ctx.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_kernel_opview_on_demand.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_kernel_plan_labels.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_kernelz_endpoint.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_make_column_shortcuts.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_middleware_http_and_cors.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_mixins_sqlalchemy.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_alias.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_class_engine_binding.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_ctx_arity_paths.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_ctx_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_ctx_core_crud_integration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_ctx_dynamic_attach.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_op_ctx_persist_options.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_opspec_effects.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_postgres_engine_errors.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_postgres_env_vars.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_relationship_alias_cols.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_request_body_schema.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_request_response_examples.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_resolver_interning_warmup.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_resolver_precedence.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_alias_table_rpc.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_ctx_precedence.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_diagnostics_kernelz.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_html_jinja_behavior.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_parity.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_rest.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_rpc.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_template.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_response_uuid.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_all_default_op_verbs.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_bulk_delete_suppresses_clear.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_no_schema_jsonable.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_operation_id_uniqueness.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_rpc_parity_default_ops.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_rpc_prefixes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rest_rpc_symmetry.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_router_compatibility_shims.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rpc_all_default_op_verbs.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_rpc_default_ops.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_schema_ctx_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_schema_ctx_plain_class.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_schema_spec_presence.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_schemas_binding.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_security_per_route.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_should_wire_canonical.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_api.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_app.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_column.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_engine.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_field.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_hook.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_io.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_op.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_storage.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_spec_table.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sqlite_attachments.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sqlite_uuid_type.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_stdapi_request_injection.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_stdapi_transport_asgi_wsgi.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_storage_spec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sys_handler_crud.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sys_run_rollback.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sys_tx_async_begin.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sys_tx_begin.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_sys_tx_commit.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_table_base_exports.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_table_collect_spec.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_table_columns_namespace.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_table_namespace_init.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_table_namespace_isolation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_app_configuration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_app_instantiation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_app_subclass_definition.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_configuration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_instantiation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_api_subclass_definition.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_app_configuration.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_app_event_handlers.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_app_instantiation.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_app_state.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_tigrbl_app_subclass_definition.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_favicon_endpoint.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_healthz_endpoint.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_op_alias.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_op_ctx_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_schemas_and_decorators.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_v3_storage_spec_attributes.py +0 -0
- {tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/unit/test_verbosity.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tigrbl_tests
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.10
|
|
4
4
|
Summary: Test suite and fixtures for the Tigrbl framework.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -33,7 +33,7 @@ Requires-Dist: tigrbl
|
|
|
33
33
|
Requires-Dist: tigrbl_client
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
|
|
36
|
-

|
|
37
37
|
|
|
38
38
|
<p align="center">
|
|
39
39
|
<a href="https://pypi.org/project/tigrbl-tests/">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<a href="https://pypi.org/project/tigrbl-tests/">
|
|
@@ -26,7 +26,7 @@ async def test_lens_mountable_on_tigrbl_app_uvicorn():
|
|
|
26
26
|
in response.text
|
|
27
27
|
)
|
|
28
28
|
assert (
|
|
29
|
-
'href="https://esm.sh/@tigrbljs/tigrbl-lens@latest/dist/tigrbl-lens.css"'
|
|
29
|
+
'href="https://esm.sh/@tigrbljs/tigrbl-lens@latest/dist/tigrbl-lens.css?css"'
|
|
30
30
|
in response.text
|
|
31
31
|
)
|
|
32
32
|
assert 'import { createRoot } from "react-dom/client";' in response.text
|
|
@@ -140,6 +140,96 @@ async def test_bulk_methods_absent(client_and_model):
|
|
|
140
140
|
assert not hasattr(Gadget.rpc, name)
|
|
141
141
|
|
|
142
142
|
|
|
143
|
+
@pytest_asyncio.fixture()
|
|
144
|
+
async def wrapper_field_client_and_model():
|
|
145
|
+
Base3.metadata.clear()
|
|
146
|
+
Base3.registry.dispose()
|
|
147
|
+
|
|
148
|
+
class WrapperNamed(Base3):
|
|
149
|
+
__tablename__ = "wrapper_named"
|
|
150
|
+
__allow_unmapped__ = True
|
|
151
|
+
|
|
152
|
+
id: Mapped[int] = acol(
|
|
153
|
+
storage=S(type_=Integer, primary_key=True, autoincrement=True)
|
|
154
|
+
)
|
|
155
|
+
data: Mapped[str] = acol(
|
|
156
|
+
storage=S(type_=String, nullable=False),
|
|
157
|
+
field=F(required_in=("create",)),
|
|
158
|
+
io=IO(in_verbs=("create", "update"), out_verbs=("read", "list")),
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
__tigrbl_cols__ = {"id": id, "data": data}
|
|
162
|
+
|
|
163
|
+
app = Tigrblv3()
|
|
164
|
+
api = Tigrblv3(engine=mem())
|
|
165
|
+
api.include_model(WrapperNamed, prefix="")
|
|
166
|
+
api.mount_jsonrpc(prefix="/rpc")
|
|
167
|
+
await api.initialize()
|
|
168
|
+
app.include_router(api.router)
|
|
169
|
+
transport = ASGITransport(app=app)
|
|
170
|
+
client = AsyncClient(transport=transport, base_url="http://test")
|
|
171
|
+
try:
|
|
172
|
+
yield client, WrapperNamed
|
|
173
|
+
finally:
|
|
174
|
+
await client.aclose()
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@pytest.mark.i9n
|
|
178
|
+
@pytest.mark.asyncio
|
|
179
|
+
async def test_rpc_create_allows_schema_defined_wrapper_like_fields(
|
|
180
|
+
wrapper_field_client_and_model,
|
|
181
|
+
):
|
|
182
|
+
client, _ = wrapper_field_client_and_model
|
|
183
|
+
payload = {
|
|
184
|
+
"jsonrpc": "2.0",
|
|
185
|
+
"method": "WrapperNamed.create",
|
|
186
|
+
"params": {"data": "legit"},
|
|
187
|
+
"id": 99,
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
response = await client.post("/rpc", json=payload)
|
|
191
|
+
|
|
192
|
+
assert response.status_code == 200
|
|
193
|
+
body = response.json()
|
|
194
|
+
assert "error" not in body
|
|
195
|
+
assert body["result"]["data"] == "legit"
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@pytest.mark.i9n
|
|
199
|
+
@pytest.mark.asyncio
|
|
200
|
+
@pytest.mark.parametrize("wrapper_key", ["data", "payload", "body", "item"])
|
|
201
|
+
async def test_rpc_create_rejects_wrapper_object(wrapper_key, client_and_model):
|
|
202
|
+
client, _ = client_and_model
|
|
203
|
+
payload = {
|
|
204
|
+
"jsonrpc": "2.0",
|
|
205
|
+
"method": "Gadget.create",
|
|
206
|
+
"params": {wrapper_key: {"name": "Wrapped", "age": 7}},
|
|
207
|
+
"id": 11,
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
response = await client.post("/rpc", json=payload)
|
|
211
|
+
|
|
212
|
+
assert response.status_code == 200
|
|
213
|
+
error = response.json()["error"]
|
|
214
|
+
assert error["code"] == -32602
|
|
215
|
+
assert error["message"] == "Invalid params"
|
|
216
|
+
assert error["data"]["disallowed_keys"] == [wrapper_key]
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
@pytest.mark.i9n
|
|
220
|
+
@pytest.mark.asyncio
|
|
221
|
+
@pytest.mark.parametrize("wrapper_key", ["data", "payload", "body", "item"])
|
|
222
|
+
async def test_rest_create_rejects_wrapper_object(wrapper_key, client_and_model):
|
|
223
|
+
client, _ = client_and_model
|
|
224
|
+
|
|
225
|
+
response = await client.post(
|
|
226
|
+
"/gadget",
|
|
227
|
+
json={wrapper_key: {"name": "Wrapped", "age": 7}},
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
assert response.status_code == 422
|
|
231
|
+
|
|
232
|
+
|
|
143
233
|
@pytest_asyncio.fixture()
|
|
144
234
|
async def bulk_client_and_model():
|
|
145
235
|
Base3.metadata.clear()
|
|
@@ -184,6 +274,31 @@ async def bulk_client_and_model():
|
|
|
184
274
|
await client.aclose()
|
|
185
275
|
|
|
186
276
|
|
|
277
|
+
@pytest.mark.i9n
|
|
278
|
+
@pytest.mark.asyncio
|
|
279
|
+
@pytest.mark.parametrize("wrapper_key", ["data", "payload", "body", "item"])
|
|
280
|
+
async def test_rpc_bulk_create_rejects_wrapper_object_items(
|
|
281
|
+
wrapper_key,
|
|
282
|
+
bulk_client_and_model,
|
|
283
|
+
):
|
|
284
|
+
client, _ = bulk_client_and_model
|
|
285
|
+
|
|
286
|
+
payload = {
|
|
287
|
+
"jsonrpc": "2.0",
|
|
288
|
+
"method": "Gadget.bulk_create",
|
|
289
|
+
"params": [{wrapper_key: {"name": "Wrapped", "age": 7}}],
|
|
290
|
+
"id": 20,
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
response = await client.post("/rpc", json=payload)
|
|
294
|
+
|
|
295
|
+
assert response.status_code == 200
|
|
296
|
+
error = response.json()["error"]
|
|
297
|
+
assert error["code"] == -32602
|
|
298
|
+
assert error["message"] == "Invalid params"
|
|
299
|
+
assert error["data"]["disallowed_keys"] == [wrapper_key]
|
|
300
|
+
|
|
301
|
+
|
|
187
302
|
@pytest.mark.i9n
|
|
188
303
|
@pytest.mark.asyncio
|
|
189
304
|
async def test_rpc_bulk_ops(bulk_client_and_model):
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from tigrbl.requests import Request
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_request_accepts_scope_with_receive_kwarg_for_compatibility() -> None:
|
|
7
|
+
scope = {
|
|
8
|
+
"type": "http",
|
|
9
|
+
"method": "post",
|
|
10
|
+
"path": "/rpc",
|
|
11
|
+
"root_path": "/api",
|
|
12
|
+
"headers": [(b"authorization", b"Bearer test-token")],
|
|
13
|
+
"query_string": b"a=1&a=2&b=3",
|
|
14
|
+
"path_params": {"tenant_id": "abc"},
|
|
15
|
+
"client": ("198.51.100.77", 443),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async def _receive() -> dict[str, object]:
|
|
19
|
+
return {"type": "http.request", "body": b"", "more_body": False}
|
|
20
|
+
|
|
21
|
+
request = Request(scope, receive=_receive)
|
|
22
|
+
|
|
23
|
+
assert request.method == "POST"
|
|
24
|
+
assert request.path == "/rpc"
|
|
25
|
+
assert str(request.url) == "/api/rpc?a=1&a=2&b=3"
|
|
26
|
+
assert request.query == {"a": ["1", "2"], "b": ["3"]}
|
|
27
|
+
assert request.path_params == {"tenant_id": "abc"}
|
|
28
|
+
assert request.headers.authorization == "Bearer test-token"
|
|
29
|
+
assert request.bearer_token == "test-token"
|
|
30
|
+
assert request.client.ip == "198.51.100.77"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_request_rejects_duplicated_scope_inputs() -> None:
|
|
34
|
+
scope = {"type": "http", "method": "GET", "path": "/"}
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
Request(scope, scope=scope)
|
|
38
|
+
except TypeError as exc:
|
|
39
|
+
assert "scope cannot be provided" in str(exc)
|
|
40
|
+
else: # pragma: no cover - explicit failure branch
|
|
41
|
+
raise AssertionError("expected Request to reject duplicate scope inputs")
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from httpx import ASGITransport, Client
|
|
2
|
+
from sqlalchemy import Column, String
|
|
3
|
+
from tigrbl import Base, TigrblApi, TigrblApp
|
|
4
|
+
from tigrbl.engine.shortcuts import mem
|
|
5
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _build_app():
|
|
9
|
+
class Widget(Base, GUIDPk):
|
|
10
|
+
__tablename__ = "widgets_openrpc"
|
|
11
|
+
name = Column(String, nullable=False)
|
|
12
|
+
|
|
13
|
+
app = TigrblApp(engine=mem(async_=False))
|
|
14
|
+
app.include_model(Widget)
|
|
15
|
+
app.initialize()
|
|
16
|
+
app.mount_jsonrpc()
|
|
17
|
+
return app, Widget
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_openrpc_endpoint_exposed():
|
|
21
|
+
app, _ = _build_app()
|
|
22
|
+
transport = ASGITransport(app=app)
|
|
23
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
24
|
+
response = client.get("/openrpc.json")
|
|
25
|
+
|
|
26
|
+
assert response.status_code == 200
|
|
27
|
+
payload = response.json()
|
|
28
|
+
assert payload["openrpc"] == "1.2.6"
|
|
29
|
+
assert payload["servers"] == [{"name": app.title, "url": "/rpc"}]
|
|
30
|
+
assert "methods" in payload
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def test_openrpc_server_url_respects_jsonrpc_prefix():
|
|
34
|
+
app, _ = _build_app()
|
|
35
|
+
app.jsonrpc_prefix = "/rpc/custom"
|
|
36
|
+
transport = ASGITransport(app=app)
|
|
37
|
+
|
|
38
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
39
|
+
payload = client.get("/openrpc.json").json()
|
|
40
|
+
|
|
41
|
+
assert payload["servers"] == [{"name": app.title, "url": "/rpc/custom"}]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_openrpc_includes_method_schema():
|
|
45
|
+
app, model = _build_app()
|
|
46
|
+
transport = ASGITransport(app=app)
|
|
47
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
48
|
+
payload = client.get("/openrpc.json").json()
|
|
49
|
+
methods = {method["name"]: method for method in payload["methods"]}
|
|
50
|
+
|
|
51
|
+
create_method = methods[f"{model.__name__}.create"]
|
|
52
|
+
assert create_method["paramStructure"] == "by-name"
|
|
53
|
+
|
|
54
|
+
params = create_method["params"][0]["schema"]
|
|
55
|
+
assert params["title"].startswith(model.__name__)
|
|
56
|
+
assert "Create" in params["title"]
|
|
57
|
+
|
|
58
|
+
result = create_method["result"]["schema"]
|
|
59
|
+
assert result["title"].startswith(model.__name__)
|
|
60
|
+
assert "Response" in result["title"]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def test_mount_jsonrpc_updates_openrpc_server_url() -> None:
|
|
64
|
+
app, _ = _build_app()
|
|
65
|
+
app.mount_jsonrpc(prefix="/jsonrpc")
|
|
66
|
+
transport = ASGITransport(app=app)
|
|
67
|
+
|
|
68
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
69
|
+
payload = client.get("/openrpc.json").json()
|
|
70
|
+
|
|
71
|
+
assert payload["servers"] == [{"name": app.title, "url": "/jsonrpc"}]
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def test_jsonrpc_create_accepts_nested_params_mapping() -> None:
|
|
75
|
+
app, model = _build_app()
|
|
76
|
+
transport = ASGITransport(app=app)
|
|
77
|
+
|
|
78
|
+
request_payload = {
|
|
79
|
+
"jsonrpc": "2.0",
|
|
80
|
+
"method": f"{model.__name__}.create",
|
|
81
|
+
"params": {"params": {"name": "New Widget"}},
|
|
82
|
+
"id": 1,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
86
|
+
response = client.post("/rpc", json=request_payload)
|
|
87
|
+
|
|
88
|
+
assert response.status_code == 200
|
|
89
|
+
data = response.json()
|
|
90
|
+
assert data["id"] == 1
|
|
91
|
+
assert "error" not in data
|
|
92
|
+
assert data["result"]["name"] == "New Widget"
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def test_mount_lens_uses_latest_openrpc_path_by_default() -> None:
|
|
96
|
+
app, _ = _build_app()
|
|
97
|
+
app.mount_openrpc(path="/schema/openrpc.json")
|
|
98
|
+
app.mount_lens(path="/lens-custom")
|
|
99
|
+
|
|
100
|
+
transport = ASGITransport(app=app)
|
|
101
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
102
|
+
html = client.get("/lens-custom").text
|
|
103
|
+
|
|
104
|
+
assert "/schema/openrpc.json" in html
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_openrpc_server_url_respects_api_mount_jsonrpc_prefix_argument():
|
|
108
|
+
class Widget(Base, GUIDPk):
|
|
109
|
+
__tablename__ = "widgets_openrpc_api_mount_prefix"
|
|
110
|
+
name = Column(String, nullable=False)
|
|
111
|
+
|
|
112
|
+
api = TigrblApi(engine=mem(async_=False))
|
|
113
|
+
api.include_model(Widget)
|
|
114
|
+
api.initialize()
|
|
115
|
+
api.mount_jsonrpc(prefix="/jsonrpc")
|
|
116
|
+
api.mount_openrpc()
|
|
117
|
+
|
|
118
|
+
transport = ASGITransport(app=api)
|
|
119
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
120
|
+
payload = client.get("/openrpc.json").json()
|
|
121
|
+
|
|
122
|
+
assert payload["servers"] == [{"name": api.title, "url": "/jsonrpc"}]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
from httpx import ASGITransport, Client
|
|
2
|
+
|
|
3
|
+
from tigrbl import Base, TigrblApp
|
|
4
|
+
from tigrbl.engine.shortcuts import mem
|
|
5
|
+
from tigrbl.orm.mixins import GUIDPk
|
|
6
|
+
from tigrbl.specs import F, IO, S, acol
|
|
7
|
+
from tigrbl.types import Mapped, String
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Widget(Base, GUIDPk):
|
|
11
|
+
__tablename__ = "widgets_openapi_openrpc_separation"
|
|
12
|
+
__allow_unmapped__ = True
|
|
13
|
+
|
|
14
|
+
name: Mapped[str] = acol(
|
|
15
|
+
storage=S(type_=String, nullable=False),
|
|
16
|
+
field=F(py_type=str),
|
|
17
|
+
io=IO(in_verbs=("create",), out_verbs=("read", "list")),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__tigrbl_cols__ = {"id": GUIDPk.id, "name": name}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _build_app() -> TigrblApp:
|
|
24
|
+
app = TigrblApp(engine=mem(async_=False))
|
|
25
|
+
app.include_model(Widget)
|
|
26
|
+
app.initialize()
|
|
27
|
+
app.mount_jsonrpc()
|
|
28
|
+
return app
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_openapi_schema_excludes_openrpc_endpoint() -> None:
|
|
32
|
+
app = _build_app()
|
|
33
|
+
transport = ASGITransport(app=app)
|
|
34
|
+
|
|
35
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
36
|
+
payload = client.get("/openapi.json").json()
|
|
37
|
+
|
|
38
|
+
assert "/openrpc.json" not in payload["paths"]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def test_openrpc_schema_excludes_openapi_endpoint() -> None:
|
|
42
|
+
app = _build_app()
|
|
43
|
+
transport = ASGITransport(app=app)
|
|
44
|
+
|
|
45
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
46
|
+
payload = client.get("/openrpc.json").json()
|
|
47
|
+
|
|
48
|
+
method_names = {method["name"].lower() for method in payload["methods"]}
|
|
49
|
+
assert all("openapi" not in name for name in method_names)
|
|
50
|
+
assert all("openrpc" not in name for name in method_names)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def test_openapi_schema_excludes_openrpc_even_if_route_is_schema_visible() -> None:
|
|
54
|
+
app = _build_app()
|
|
55
|
+
|
|
56
|
+
def openrpc_override(_request):
|
|
57
|
+
return {"openrpc": "1.2.6"}
|
|
58
|
+
|
|
59
|
+
app.add_api_route(
|
|
60
|
+
"/openrpc.json",
|
|
61
|
+
openrpc_override,
|
|
62
|
+
methods=["GET"],
|
|
63
|
+
name="openrpc_json",
|
|
64
|
+
include_in_schema=True,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
transport = ASGITransport(app=app)
|
|
68
|
+
with Client(transport=transport, base_url="http://test") as client:
|
|
69
|
+
payload = client.get("/openapi.json").json()
|
|
70
|
+
|
|
71
|
+
assert "/openrpc.json" not in payload["paths"]
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from tigrbl import TigrblApp
|
|
4
|
+
from tigrbl.system import build_lens, build_openapi, build_openrpc_spec, build_swagger
|
|
5
|
+
from tigrbl.types import Request
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@pytest.mark.unit
|
|
9
|
+
def test_system_build_helpers_return_documents() -> None:
|
|
10
|
+
app = TigrblApp()
|
|
11
|
+
request = Request(
|
|
12
|
+
method="GET", path="/docs", headers={}, query={}, path_params={}, body=b""
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
openapi_doc = build_openapi(app)
|
|
16
|
+
openrpc_doc = build_openrpc_spec(app)
|
|
17
|
+
swagger_html = build_swagger(app, request)
|
|
18
|
+
lens_html = build_lens(app, request, spec_path="/openrpc.json")
|
|
19
|
+
|
|
20
|
+
assert openapi_doc["openapi"].startswith("3.")
|
|
21
|
+
assert openrpc_doc["openrpc"] == "1.2.6"
|
|
22
|
+
assert openrpc_doc["servers"] == [{"name": app.title, "url": "/rpc"}]
|
|
23
|
+
assert "swagger-ui" in swagger_html
|
|
24
|
+
assert "tigrbl-lens" in lens_html
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.unit
|
|
28
|
+
def test_openrpc_builder_uses_request_origin_and_jsonrpc_prefix() -> None:
|
|
29
|
+
app = TigrblApp(jsonrpc_prefix="/gateway/rpc")
|
|
30
|
+
request = Request(
|
|
31
|
+
method="GET",
|
|
32
|
+
path="/openrpc.json",
|
|
33
|
+
headers={"host": "api.example.com", "x-forwarded-proto": "https"},
|
|
34
|
+
query={},
|
|
35
|
+
path_params={},
|
|
36
|
+
body=b"",
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
openrpc_doc = build_openrpc_spec(app, request=request)
|
|
40
|
+
|
|
41
|
+
assert openrpc_doc["servers"] == [
|
|
42
|
+
{"name": app.title, "url": "https://api.example.com/gateway/rpc"}
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@pytest.mark.unit
|
|
47
|
+
def test_openrpc_builder_normalizes_forwarded_host_header_values() -> None:
|
|
48
|
+
app = TigrblApp(jsonrpc_prefix="/gateway/rpc")
|
|
49
|
+
request = Request(
|
|
50
|
+
method="GET",
|
|
51
|
+
path="/openrpc.json",
|
|
52
|
+
headers={
|
|
53
|
+
"x-forwarded-host": "api.example.com,edge.proxy.internal",
|
|
54
|
+
"x-forwarded-proto": "https, http",
|
|
55
|
+
},
|
|
56
|
+
query={},
|
|
57
|
+
path_params={},
|
|
58
|
+
body=b"",
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
openrpc_doc = build_openrpc_spec(app, request=request)
|
|
62
|
+
|
|
63
|
+
assert openrpc_doc["servers"] == [
|
|
64
|
+
{"name": app.title, "url": "https://api.example.com/gateway/rpc"}
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@pytest.mark.unit
|
|
69
|
+
def test_openrpc_builder_prefers_request_scheme_without_forwarded_proto() -> None:
|
|
70
|
+
app = TigrblApp(jsonrpc_prefix="/gateway/rpc")
|
|
71
|
+
request = Request(
|
|
72
|
+
method="GET",
|
|
73
|
+
path="/openrpc.json",
|
|
74
|
+
headers={"x-forwarded-host": "api.example.com"},
|
|
75
|
+
query={},
|
|
76
|
+
path_params={},
|
|
77
|
+
body=b"",
|
|
78
|
+
scope={"scheme": "https"},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
openrpc_doc = build_openrpc_spec(app, request=request)
|
|
82
|
+
|
|
83
|
+
assert openrpc_doc["servers"] == [
|
|
84
|
+
{"name": app.title, "url": "https://api.example.com/gateway/rpc"}
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@pytest.mark.unit
|
|
89
|
+
def test_openrpc_builder_prefers_forwarded_proto_over_request_scheme() -> None:
|
|
90
|
+
app = TigrblApp(jsonrpc_prefix="/gateway/rpc")
|
|
91
|
+
request = Request(
|
|
92
|
+
method="GET",
|
|
93
|
+
path="/openrpc.json",
|
|
94
|
+
headers={"host": "api.example.com", "x-forwarded-proto": "https"},
|
|
95
|
+
query={},
|
|
96
|
+
path_params={},
|
|
97
|
+
body=b"",
|
|
98
|
+
scope={"scheme": "http"},
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
openrpc_doc = build_openrpc_spec(app, request=request)
|
|
102
|
+
|
|
103
|
+
assert openrpc_doc["servers"] == [
|
|
104
|
+
{"name": app.title, "url": "https://api.example.com/gateway/rpc"}
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@pytest.mark.unit
|
|
109
|
+
def test_openrpc_builder_keeps_relative_server_url_without_forwarding_headers() -> None:
|
|
110
|
+
app = TigrblApp(jsonrpc_prefix="/gateway/rpc")
|
|
111
|
+
request = Request(
|
|
112
|
+
method="GET",
|
|
113
|
+
path="/openrpc.json",
|
|
114
|
+
headers={"host": "api.example.com"},
|
|
115
|
+
query={},
|
|
116
|
+
path_params={},
|
|
117
|
+
body=b"",
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
openrpc_doc = build_openrpc_spec(app, request=request)
|
|
121
|
+
|
|
122
|
+
assert openrpc_doc["servers"] == [{"name": app.title, "url": "/gateway/rpc"}]
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
from httpx import ASGITransport, Client
|
|
2
|
-
from sqlalchemy import Column, String
|
|
3
|
-
from tigrbl import Base, TigrblApp
|
|
4
|
-
from tigrbl.engine.shortcuts import mem
|
|
5
|
-
from tigrbl.orm.mixins import GUIDPk
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def _build_app():
|
|
9
|
-
class Widget(Base, GUIDPk):
|
|
10
|
-
__tablename__ = "widgets_openrpc"
|
|
11
|
-
name = Column(String, nullable=False)
|
|
12
|
-
|
|
13
|
-
app = TigrblApp(engine=mem(async_=False))
|
|
14
|
-
app.include_model(Widget)
|
|
15
|
-
app.initialize()
|
|
16
|
-
app.mount_jsonrpc()
|
|
17
|
-
return app, Widget
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def test_openrpc_endpoint_exposed():
|
|
21
|
-
app, _ = _build_app()
|
|
22
|
-
transport = ASGITransport(app=app)
|
|
23
|
-
with Client(transport=transport, base_url="http://test") as client:
|
|
24
|
-
response = client.get("/openrpc.json")
|
|
25
|
-
|
|
26
|
-
assert response.status_code == 200
|
|
27
|
-
payload = response.json()
|
|
28
|
-
assert payload["openrpc"] == "1.2.6"
|
|
29
|
-
assert payload["servers"] == [{"name": app.title, "url": "/jsonrpc"}]
|
|
30
|
-
assert "methods" in payload
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
def test_openrpc_includes_method_schema():
|
|
34
|
-
app, model = _build_app()
|
|
35
|
-
transport = ASGITransport(app=app)
|
|
36
|
-
with Client(transport=transport, base_url="http://test") as client:
|
|
37
|
-
payload = client.get("/openrpc.json").json()
|
|
38
|
-
methods = {method["name"]: method for method in payload["methods"]}
|
|
39
|
-
|
|
40
|
-
create_method = methods[f"{model.__name__}.create"]
|
|
41
|
-
assert create_method["paramStructure"] == "by-name"
|
|
42
|
-
|
|
43
|
-
params = create_method["params"][0]["schema"]
|
|
44
|
-
assert params["title"].startswith(model.__name__)
|
|
45
|
-
assert "Create" in params["title"]
|
|
46
|
-
|
|
47
|
-
result = create_method["result"]["schema"]
|
|
48
|
-
assert result["title"].startswith(model.__name__)
|
|
49
|
-
assert "Response" in result["title"]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
from tigrbl import TigrblApp
|
|
4
|
-
from tigrbl.system import build_lens, build_openapi, build_openrpc_spec, build_swagger
|
|
5
|
-
from tigrbl.types import Request
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@pytest.mark.unit
|
|
9
|
-
def test_system_build_helpers_return_documents() -> None:
|
|
10
|
-
app = TigrblApp()
|
|
11
|
-
request = Request(
|
|
12
|
-
method="GET", path="/docs", headers={}, query={}, path_params={}, body=b""
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
openapi_doc = build_openapi(app)
|
|
16
|
-
openrpc_doc = build_openrpc_spec(app)
|
|
17
|
-
swagger_html = build_swagger(app, request)
|
|
18
|
-
lens_html = build_lens(app, request, spec_path="/openrpc.json")
|
|
19
|
-
|
|
20
|
-
assert openapi_doc["openapi"].startswith("3.")
|
|
21
|
-
assert openrpc_doc["openrpc"] == "1.2.6"
|
|
22
|
-
assert openrpc_doc["servers"] == [{"name": app.title, "url": "/jsonrpc"}]
|
|
23
|
-
assert "swagger-ui" in swagger_html
|
|
24
|
-
assert "tigrbl-lens" in lens_html
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/hooks/test_hook_ctx_phase_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tigrbl_tests-0.3.9.dev4 → tigrbl_tests-0.3.10}/tests/i9n/test_authn_provider_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|