Source: python-django-postgres-extra
Version: 2.0.9-1
Severity: serious
Justification: autopkgtest failure

Dear Maintainer,

The autopkgtest of your package is failing with postgresql-common (284) which 
depends on postgresql-18:

 77s =================================== FAILURES 
===================================
 77s ___________________ test_schema_editor_clone_model_to_schema 
___________________
 77s 
 77s fake_model = <class 'tests.fake_model.D51210B1'>
 77s fake_model_fk_target_1 = <class 'tests.fake_model.2886Ea25'>
 77s fake_model_fk_target_2 = <class 'tests.fake_model.7Fb4D0D9'>
 77s 
 77s     @pytest.mark.skipif(
 77s         django.VERSION < (3, 2),
 77s         reason=django_32_skip_reason,
 77s     )
 77s     @pytest.mark.django_db(transaction=True)
 77s     def test_schema_editor_clone_model_to_schema(
 77s         fake_model, fake_model_fk_target_1, fake_model_fk_target_2
 77s     ):
 77s         """Tests that cloning a model into a separate schema without 
obtaining
 77s         AccessExclusiveLock on the source table works as expected."""
 77s     
 77s         schema_editor = PostgresSchemaEditor(connection)
 77s     
 77s         with schema_editor:
 77s             schema_editor.alter_table_storage_setting(
 77s                 fake_model._meta.db_table, "autovacuum_enabled", "false"
 77s             )
 77s     
 77s         table_name = fake_model._meta.db_table
 77s         source_schema_name = "public"
 77s         target_schema_name = _create_schema()
 77s     
 77s         with schema_editor:
 77s             schema_editor.clone_model_structure_to_schema(
 77s                 fake_model, schema_name=target_schema_name
 77s             )
 77s     
 77s             assert _list_lock_modes_in_schema(source_schema_name) == {
 77s                 "AccessShareLock"
 77s             }
 77s     
 77s >       _assert_cloned_table_is_same(
 77s             (source_schema_name, table_name),
 77s             (target_schema_name, table_name),
 77s             excluding_constraints_and_indexes=True,
 77s         )
 77s 
 77s tests/test_schema_editor_clone_model_to_schema.py:236: 
 77s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ 
 77s /usr/lib/python3.13/contextlib.py:85: in inner
 77s     return func(*args, **kwds)
 77s            ^^^^^^^^^^^^^^^^^^^
 77s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ 
 77s 
 77s source_table_fqn = ('public', 'tests_d51210b1')
 77s target_table_fqn = ('06e2d136', 'tests_d51210b1')
 77s excluding_constraints_and_indexes = True
 77s 
 77s     @transaction.atomic
 77s     def _assert_cloned_table_is_same(
 77s         source_table_fqn: Tuple[str, str],
 77s         target_table_fqn: Tuple[str, str],
 77s         excluding_constraints_and_indexes: bool = False,
 77s     ):
 77s         source_schema_name, source_table_name = source_table_fqn
 77s         target_schema_name, target_table_name = target_table_fqn
 77s     
 77s         source_columns = db_introspection.get_columns(
 77s             source_table_name, schema_name=source_schema_name
 77s         )
 77s         target_columns = db_introspection.get_columns(
 77s             target_table_name, schema_name=target_schema_name
 77s         )
 77s         assert source_columns == target_columns
 77s     
 77s         source_relations = db_introspection.get_relations(
 77s             source_table_name, schema_name=source_schema_name
 77s         )
 77s         target_relations = db_introspection.get_relations(
 77s             target_table_name, schema_name=target_schema_name
 77s         )
 77s         if excluding_constraints_and_indexes:
 77s             assert target_relations == {}
 77s         else:
 77s             assert source_relations == target_relations
 77s     
 77s         source_constraints = db_introspection.get_constraints(
 77s             source_table_name, schema_name=source_schema_name
 77s         )
 77s         target_constraints = db_introspection.get_constraints(
 77s             target_table_name, schema_name=target_schema_name
 77s         )
 77s         if excluding_constraints_and_indexes:
 77s >           assert target_constraints == {}
 77s E           AssertionError: assert {'tests_d5121...ne, ...}, ...} == {}
 77s E             
 77s E             Left contains 7 more items:
 77s E             {'tests_d51210b1_age_not_null': {'check': False,
 77s E                                              'columns': ['age'],
 77s E                                              'definition': None,
 77s E                                              'foreign_key': None,
 77s E                                              'index': False,...
 77s E             
 77s E             ...Full output truncated (52 lines hidden), use '-vv' to show
 77s 
 77s tests/test_schema_editor_clone_model_to_schema.py:72: AssertionError

https://ci.debian.net/packages/p/python-django-postgres-extra/testing/amd64/65001064/

Reply via email to