Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tortoise/tortoise-orm
/ functions
Functions
3,850 in github.com/tortoise/tortoise-orm
⨍
Functions
3,850
◇
Types & classes
935
↳
Endpoints
102
Function
test_check_loop_returns_false_on_different_loop
()
tests/test_connection.py:313
Function
test_check_loop_returns_true_on_same_loop
()
tests/test_connection.py:305
Function
test_check_loop_returns_true_when_not_bound
()
tests/test_connection.py:297
Function
test_clear_storage
(conn_handler)
tests/test_connection.py:71
Function
test_clone
(tournament_model)
tests/test_model_methods.py:431
Function
test_clone_from_db
(tournament_model)
tests/test_model_methods.py:454
Function
test_clone_pk_required
(db)
tests/test_model_methods.py:97
Function
test_clone_pk_required_error
(db)
tests/test_model_methods.py:90
Function
test_clone_with_pk
(tournament_model)
tests/test_model_methods.py:442
Function
test_close_all_with_discard
(mocked_db_config, conn_handler)
tests/test_connection.py:263
Function
test_close_all_without_discard
(mocked_db_config, conn_handler)
tests/test_connection.py:279
Function
test_commit_raising_exception
Tests that if a commit raises an exception, the connection context is restored.
tests/test_transactions.py:420
Function
test_computed_field
(db, pydantic_computed_setup)
tests/contrib/test_pydantic.py:1704
Function
test_computed_field_excluded_relation_not_prefetched
Computed field accessing an excluded, non-prefetched relation. When team_members is excluded from the Pydantic model AND not manually prefetched,
tests/contrib/test_pydantic.py:2243
Function
test_computed_field_excluded_relation_works_with_manual_prefetch
Computed field accessing an excluded relation works when manually prefetched. If the user prefetches the relation before calling from_tortoise_or
tests/contrib/test_pydantic.py:2274
Function
test_computed_field_relation_in_model
Computed field accessing a reverse relation that IS in the Pydantic model. This tests the happy path where team_members is a Pydantic field AND t
tests/contrib/test_pydantic.py:2303
Function
test_computed_field_schema
(db, pydantic_computed_setup)
tests/contrib/test_pydantic.py:1716
Function
test_concat_functions
(db)
tests/test_aggregation.py:174
Function
test_concurrency_create_isolated
Test concurrent creates.
tests/test_concurrency.py:27
Function
test_concurrency_create_transactioned
Test concurrent creates within transaction.
tests/test_concurrency.py:127
Function
test_concurrency_read_isolated
Test concurrent reads.
tests/test_concurrency.py:18
Function
test_concurrency_read_transactioned
Test concurrent reads within transaction.
tests/test_concurrency.py:117
Function
test_concurrent_get_or_create_isolated
Test concurrent get_or_create.
tests/test_concurrency.py:49
Function
test_concurrent_queries_lazy_init
Test concurrent queries with lazy connection initialization. Tortoise.init is lazy and does not initialize the database connection until the
tests/test_concurrency.py:152
Function
test_concurrent_transactions_lazy_init
Test concurrent transactions with lazy connection initialization.
tests/test_concurrency.py:165
Function
test_concurrent_transactions_with_multiple_ops
Test concurrent transactions with multiple operations.
tests/test_concurrency.py:63
Function
test_concurrent_transactions_with_single_op
Test concurrent transactions with single operation.
tests/test_concurrency.py:80
Function
test_config_classes_merge_all_configs
Model creator should merge all 3 configs. - It merges (Default, Meta's config_class and creator's config_class) together.
tests/contrib/test_pydantic.py:1431
Function
test_connection_name
Will fail with a ConfigurationError since connection 'other' does not exist.
tests/backends/test_capabilities.py:34
Method
test_connections_cleaned_on_async_context_exit
Connections closed on async context exit.
tests/test_context.py:173
Function
test_consequent_nested_transactions
Test consequent nested transactions.
tests/test_transactions.py:57
Function
test_construct_backward_fk_as_list
(db)
tests/test_model_construct.py:96
Function
test_construct_backward_fk_contains
(db)
tests/test_model_construct.py:124
Function
test_construct_backward_fk_empty_list
(db)
tests/test_model_construct.py:117
Function
test_construct_backward_fk_fetched
(db)
tests/test_model_construct.py:111
Function
test_construct_backward_fk_is_reverse_relation
(db)
tests/test_model_construct.py:105
Function
test_construct_backward_o2o
Dest_null has backward O2O 'address_null' from O2O_null.
tests/test_model_construct.py:168
Function
test_construct_book_with_author_fk
Book has an FK to Author.
tests/test_model_construct.py:334
Function
test_construct_callable_default
Event has token field with default=generate_token (callable).
tests/test_model_construct.py:198
Function
test_construct_defaults_applied
(db)
tests/test_model_construct.py:42
Function
test_construct_fk_source_field_not_overwritten_by_defaults
When tournament=obj is passed, tournament_id should not be overwritten to None by defaults.
tests/test_model_construct.py:298
Function
test_construct_forward_o2o
Address has a forward O2O field 'event' pointing to Event.
tests/test_model_construct.py:182
Function
test_construct_m2m_as_list
(db)
tests/test_model_construct.py:136
Function
test_construct_m2m_empty_list
(db)
tests/test_model_construct.py:157
Function
test_construct_m2m_fetched
(db)
tests/test_model_construct.py:151
Function
test_construct_m2m_is_m2m_relation
(db)
tests/test_model_construct.py:145
Function
test_construct_multiple_fks
Event has both tournament (required FK) and reporter (nullable FK).
tests/test_model_construct.py:322
Function
test_construct_no_fk_saved_check
construct() should accept unsaved FK objects without raising.
tests/test_model_construct.py:238
Function
test_construct_no_null_validation
Unlike __init__, construct() should NOT raise ValueError for null in non-nullable fields.
tests/test_model_construct.py:230
Function
test_construct_none_default
Fields without explicit defaults should get None.
tests/test_model_construct.py:207
Function
test_construct_nullable_fk
Nullable FK field set to None should work.
tests/test_model_construct.py:306
Function
test_construct_nullable_fk_with_object
Nullable FK field set to an object should work.
tests/test_model_construct.py:313
Function
test_construct_partial_and_custom_pk_flags
(db)
tests/test_model_construct.py:49
Function
test_construct_pk_accessible
(db)
tests/test_model_construct.py:274
Function
test_construct_repr
(db)
tests/test_model_construct.py:279
Function
test_construct_saved_in_db_flag
(db)
tests/test_model_construct.py:36
Method
test_construct_sets_database_default
(self, db)
tests/test_db_default_insert.py:85
Function
test_construct_simple_fields
(db)
tests/test_model_construct.py:28
Function
test_construct_simple_fields_without_init
Simple data fields should work without Tortoise.init() / db fixture.
tests/test_model_construct.py:251
Function
test_construct_str
(db)
tests/test_model_construct.py:285
Function
test_construct_unknown_kwargs_stored
Unknown kwargs should be stored as instance attributes (no validation).
tests/test_model_construct.py:291
Function
test_construct_unknown_kwargs_without_init
Unknown kwargs should work without initialization.
tests/test_model_construct.py:262
Function
test_construct_unprovided_relation_fields_no_default
Backward FK/M2M fields not provided should not raise errors. They are lazily created by the property getter.
tests/test_model_construct.py:215
Function
test_construct_with_fk_none
(db)
tests/test_model_construct.py:70
Function
test_construct_with_fk_object
(db)
tests/test_model_construct.py:61
Function
test_construct_with_fk_unsaved_allowed
Unlike __init__, construct() does NOT check _saved_in_db on FK values.
tests/test_model_construct.py:76
Function
test_construct_with_source_field_directly
(db)
tests/test_model_construct.py:85
Function
test_constructor_100_many_defaults
Construct 100 model instances with many defaults — deepcopy skip path.
tests/benchmarks/test_hydration.py:112
Function
test_contained_by_ints
Test contained_by filter on integer array field.
tests/fields/test_array.py:126
Function
test_contained_by_strs
Test contained_by filter on string array field.
tests/fields/test_array.py:144
Function
test_contains_ints
Test contains filter on integer array field.
tests/fields/test_array.py:85
Function
test_contains_smallints
Test contains filter on smallint array field.
tests/fields/test_array.py:100
Function
test_contains_strs
Test contains filter on string array field.
tests/fields/test_array.py:110
Method
test_context_apps_property_initially_none
Apps property is initially None.
tests/test_context.py:47
Method
test_context_connections_isolated_from_global
Context connections isolated from global.
tests/test_context.py:138
Method
test_context_connections_property_lazy_creation
ConnectionHandler is lazily created on first access.
tests/test_context.py:35
Method
test_context_default_timezone_settings
Context has default timezone settings.
tests/test_context.py:470
Method
test_context_instantiation_initial_state
TortoiseContext instantiation has correct initial state.
tests/test_context.py:26
Method
test_context_manager_resets_on_exit
Context manager resets on exit.
tests/test_context.py:68
Method
test_context_manager_sets_current_context
Context manager sets current context.
tests/test_context.py:57
Function
test_copy_preserves_db_default
()
tests/fields/test_db_default.py:240
Function
test_copy_preserves_no_db_default
()
tests/fields/test_db_default.py:250
Function
test_copy_storage
(conn_handler)
tests/test_connection.py:63
Function
test_count
(sql_context)
tests/test_sql.py:169
Function
test_count_after_aggregate
(db)
tests/test_aggregation.py:188
Function
test_count_after_aggregate_m2m
(db)
tests/test_aggregation.py:237
Function
test_count_filter_group_by
(db, group_by_data)
tests/test_group_by.py:49
Function
test_count_group_by
(db, group_by_data)
tests/test_group_by.py:20
Function
test_count_group_by_with_join
(db, group_by_data)
tests/test_group_by.py:36
Function
test_count_values_list_filter_group_by
(db, group_by_data)
tests/test_group_by.py:172
Function
test_count_values_list_group_by
(db, group_by_data)
tests/test_group_by.py:142
Function
test_count_values_list_group_by_with_join
(db, group_by_data)
tests/test_group_by.py:162
Function
test_count_without_matching
(db)
tests/test_aggregation.py:280
Function
test_create
(signals_data)
tests/test_signals.py:71
Function
test_create
(db)
tests/test_model_methods.py:178
Function
test_create
(db)
tests/contrib/mysql/fields.py:16
Function
test_create
(db)
tests/fields/test_char.py:25
Function
test_create
(db)
tests/fields/test_bool.py:14
Function
test_create
Test JSON field creation and retrieval.
tests/fields/test_json.py:33
Function
test_create
(db)
tests/fields/test_binary.py:15
← previous
next →
2,301–2,400 of 3,850, ranked by callers