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_404
(client: AsyncClient)
examples/fastapi/_tests.py:116
Function
test_404_east
(client_east: AsyncClient)
examples/fastapi/_tests.py:158
Function
test_422
(client: AsyncClient)
examples/fastapi/_tests.py:124
Function
test_422_east
(client_east: AsyncClient)
examples/fastapi/_tests.py:166
Function
test_AE_default
(db, intfields_data)
tests/test_case_when.py:147
Function
test_AE_then
(db, intfields_data)
tests/test_case_when.py:92
Function
test_F_default
(db, intfields_data)
tests/test_case_when.py:129
Function
test_F_then
(db, intfields_data)
tests/test_case_when.py:74
Function
test__add
Test adding a related object via M2M relation.
tests/fields/test_m2m.py:15
Function
test__add
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:36
Function
test__add__many
Test adding same object multiple times (should be idempotent).
tests/fields/test_m2m.py:42
Function
test__add__many
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:63
Function
test__add__nothing
Test adding nothing to M2M relation.
tests/fields/test_m2m.py:25
Function
test__add__nothing
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:46
Function
test__add__reverse
Test adding via reverse M2M relation.
tests/fields/test_m2m.py:32
Function
test__add__reverse
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:53
Function
test__add__two
Test adding multiple related objects at once.
tests/fields/test_m2m.py:54
Function
test__add__two
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:75
Function
test__add__two_two
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:87
Function
test__add_uninstantiated
Test that adding unsaved model raises OperationalError.
tests/fields/test_m2m.py:124
Function
test__add_uninstantiated
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:160
Function
test__clear
Test clearing all related objects from M2M relation.
tests/fields/test_m2m.py:102
Function
test__clear
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:138
Function
test__remove
Test removing one related object from M2M relation.
tests/fields/test_m2m.py:66
Function
test__remove
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:102
Function
test__remove__blank
Test that removing nothing raises OperationalError.
tests/fields/test_m2m.py:94
Function
test__remove__blank
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:130
Function
test__remove__many
Test removing multiple related objects at once.
tests/fields/test_m2m.py:79
Function
test__remove__many
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:115
Function
test__uninstantiated_add
Test that adding to unsaved model raises OperationalError.
tests/fields/test_m2m.py:115
Function
test__uninstantiated_add
(db, m2m_uuid_models)
tests/fields/test_m2m_uuid.py:151
Function
test_actually_runs
Test that xfail actually runs.
tests/backends/test_capabilities.py:42
Function
test_add_and_remove_unique_constraint
AddConstraint creates a unique constraint; RemoveConstraint drops it.
tests/migrations/test_operations_real_db.py:419
Function
test_add_check_constraint
AddConstraint with CheckConstraint enforces data validation on real DB.
tests/migrations/test_operations_real_db.py:479
Function
test_add_check_constraint_generates_sql
add_constraint with CheckConstraint generates correct SQL per backend.
tests/migrations/test_schema_editor_constraints.py:459
Function
test_add_constraint_idempotent_for_resolved_names
add_constraint with already-resolved DB column names (organization_id) works correctly.
tests/migrations/test_schema_editor_constraints.py:334
Function
test_add_constraint_operation_runs_sql
()
tests/migrations/test_operations_database.py:184
Function
test_add_constraint_resolves_fk_fields
add_constraint with FK field name must resolve to DB column name (organization_id).
tests/migrations/test_schema_editor_constraints.py:317
Function
test_add_field
(state_with_model: State)
tests/migrations/test_operations_state.py:344
Function
test_add_field_generates_add_column_sql
()
tests/migrations/test_schema_editor_sql.py:57
Function
test_add_field_generates_generated_column_sql
()
tests/migrations/test_schema_editor_sql.py:141
Function
test_add_field_m2m_generates_table_sql
()
tests/migrations/test_schema_editor_sql.py:81
Function
test_add_field_operation_runs_sql
()
tests/migrations/test_operations_database.py:88
Function
test_add_field_relational
( state_with_two_models: State, field_class: type[ForeignKeyFieldInstance | OneToOneFieldInstance | Ma
tests/migrations/test_operations_state.py:363
Function
test_add_field_with_db_default
AddField with db_default=42 creates a column whose default is applied on INSERT.
tests/migrations/test_operations_real_db.py:133
Function
test_add_field_with_db_default
ADD COLUMN includes DEFAULT clause when field has db_default.
tests/fields/test_db_default.py:493
Function
test_add_field_with_now_default
AddField with db_default=Now() creates a timestamp column with a server-side default.
tests/migrations/test_operations_real_db.py:176
Function
test_add_field_with_sql_default
Migration add_field with SqlDefault.
tests/fields/test_db_default.py:659
Function
test_add_field_without_db_default_no_default_clause
ADD COLUMN omits DEFAULT clause when field has no db_default.
tests/fields/test_db_default.py:513
Function
test_add_index_generates_gin_tsvector_sql
()
tests/migrations/test_schema_editor_sql.py:172
Function
test_add_index_operation_runs_sql
()
tests/migrations/test_operations_database.py:122
Function
test_add_model_only_id
(empty_state: State)
tests/migrations/test_operations_state.py:33
Function
test_add_model_simple_fields
(empty_state: State)
tests/migrations/test_operations_state.py:46
Function
test_add_model_two_simple_models_fields_in_one_app
(empty_state: State)
tests/migrations/test_operations_state.py:63
Function
test_add_model_two_simple_models_fields_in_one_app_with_fk
( empty_state: State, field_class: type[ForeignKeyFieldInstance | OneToOneFieldInstance | ManyToManyFi
tests/migrations/test_operations_state.py:113
Function
test_add_model_two_simple_models_fields_in_two_apps
(empty_state: State)
tests/migrations/test_operations_state.py:82
Function
test_added_by_poetry_v2
(tmp_path: Path)
tests/test_version.py:54
Function
test_address
(db, pydantic_setup)
tests/contrib/test_pydantic.py:1151
Function
test_address_schema
(db, pydantic_setup)
tests/contrib/test_pydantic.py:503
Function
test_aggregate_avg
(db)
tests/fields/test_decimal.py:207
Function
test_aggregate_avg_with_f_expression
(db)
tests/fields/test_decimal.py:220
Function
test_aggregate_max
(db)
tests/fields/test_decimal.py:261
Function
test_aggregate_max_with_f_expression
(db)
tests/fields/test_decimal.py:274
Function
test_aggregate_sum
(db)
tests/fields/test_decimal.py:116
Function
test_aggregate_sum_different_field_type_at_left_with_f_expression
(db)
tests/fields/test_decimal.py:195
Function
test_aggregate_sum_different_field_type_at_right_with_f_expression
(db)
tests/fields/test_decimal.py:183
Function
test_aggregate_sum_no_exist_field_with_f_expression
(db)
tests/fields/test_decimal.py:170
Function
test_aggregate_sum_with_f_expression
(db)
tests/fields/test_decimal.py:129
Function
test_aggregation
(db)
tests/test_aggregation.py:22
Function
test_aggregation_with_distinct
(db)
tests/test_aggregation.py:83
Function
test_aggregation_with_filter
(db)
tests/test_aggregation.py:110
Method
test_aggregation_with_filter
(self, db)
tests/test_source_field.py:215
Function
test_all
(mocked_db_config, conn_handler)
tests/test_connection.py:252
Function
test_all
(tournament_model)
tests/test_model_methods.py:324
Function
test_all_count
(db, intfields_data)
tests/test_queryset.py:42
Function
test_all_flat_values_list
(db, intfields_data)
tests/test_queryset.py:578
Function
test_all_values
(db, intfields_data)
tests/test_queryset.py:590
Function
test_all_values_list
(db, intfields_data)
tests/test_queryset.py:584
Function
test_alter_field
(state_with_model: State)
tests/migrations/test_operations_state.py:437
Function
test_alter_field_backward_renames_columns
()
tests/migrations/test_operations_database.py:206
Function
test_alter_field_change_from_literal_to_sql_default
Migration alter_field change from literal to SqlDefault.
tests/fields/test_db_default.py:708
Function
test_alter_field_description_change_applied
Changing only a field's description should execute actual DDL. Reproduces https://github.com/tortoise/tortoise-orm/issues/2141 (bug 2). The
tests/migrations/test_operations_real_db.py:723
Function
test_alter_field_forward_db_default_change
AlterField should SET DEFAULT when adding db_default and DROP DEFAULT when removing it.
tests/migrations/test_operations_database.py:501
Function
test_alter_field_forward_null_change
AlterField null=False to null=True should DROP NOT NULL; reverse should SET NOT NULL.
tests/migrations/test_operations_database.py:463
Function
test_alter_field_max_length_preserves_db_default
Changing max_length on a field with db_default must not lose the default. Reproduces https://github.com/tortoise/tortoise-orm/issues/2141 (bug 1)
tests/migrations/test_operations_real_db.py:598
Function
test_alter_field_null_change
AlterField can change a column from NOT NULL to NULL and back.
tests/migrations/test_operations_real_db.py:525
Function
test_alter_field_null_change_preserves_db_default
Changing nullability on a field with db_default must not lose the default. Reproduces a variant of https://github.com/tortoise/tortoise-orm/issue
tests/migrations/test_operations_real_db.py:663
Function
test_alter_field_set_and_drop_db_default
AlterField can SET DEFAULT and then DROP DEFAULT on a real database. The table is created without a db_default, then AlterField is used to ad
tests/migrations/test_operations_real_db.py:239
Function
test_alter_field_set_default_with_sql_default
Migration alter_field SET DEFAULT with SqlDefault.
tests/fields/test_db_default.py:682
Function
test_alter_field_sql_change_default
ALTER TABLE generates SET DEFAULT with the new value when changing db_default.
tests/fields/test_db_default.py:468
Function
test_alter_field_sql_drop_default
ALTER TABLE generates DROP DEFAULT when removing db_default.
tests/fields/test_db_default.py:444
Function
test_alter_field_sql_set_default
ALTER TABLE generates SET DEFAULT when adding db_default.
tests/fields/test_db_default.py:419
Function
test_alter_field_unique_to_nonunique_generates_drop_constraint
Changing unique=True to unique=False should produce a DROP CONSTRAINT.
tests/migrations/test_operations_database.py:295
Function
test_alter_generated_field_raises
()
tests/migrations/test_schema_editor_sql.py:196
Function
test_alter_options
(state_with_model: State)
tests/migrations/test_operations_state.py:336
Function
test_annotate
(sql_context)
tests/test_sql.py:65
Function
test_annotate_coalesce_field_expression
(sql_context)
tests/test_sql.py:92
Function
test_annotate_concat_fields
(sql_context)
tests/test_sql.py:80
Function
test_annotate_expression_filter
(db, intfields_data)
tests/test_queryset.py:617
Function
test_annotate_function_join_expression
(sql_context)
tests/test_sql.py:104
← previous
next →
2,001–2,100 of 3,850, ranked by callers