Skip to content

(PC-31051)[BO] feat: add ff WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING_C… #4747

(PC-31051)[BO] feat: add ff WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING_C…

(PC-31051)[BO] feat: add ff WIP_DISABLE_NOTIFICATION_CANCEL_BOOKING_C… #4747

GitHub Actions / Pytest Report failed Sep 19, 2024 in 0s

2521 tests run, 2482 passed, 1 skipped, 38 failed.

Annotations

Check failure on line 44 in tests/routes/pro/delete_stock_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/delete_stock_test.py.when_current_user_has_rights_on_offer_with_disabled_notification_cancel_booking

AssertionError: assert not True
 +  where True = <MagicMock name='delay' id='139710932033488'>.called
Raw output
tests/routes/pro/delete_stock_test.py:67: in when_current_user_has_rights_on_offer_with_disabled_notification_cancel_booking
    assert not mocked_cancel_booking_notification.called
E   AssertionError: assert not True
E    +  where True = <MagicMock name='delay' id='139710932033488'>.called

Check failure on line 65 in tests/routes/pro/delete_stocks_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/delete_stocks_test.py.test_delete_unaccessible_stocks

assert False
 +  where False = all(<generator object Returns204Test.test_delete_unaccessible_stocks.<locals>.<genexpr> at 0x7f10f3088d40>)
Raw output
tests/routes/pro/delete_stocks_test.py:83: in test_delete_unaccessible_stocks
    assert all(not stock.isSoftDeleted for stock in offer_models.Stock.query.all())
E   assert False
E    +  where False = all(<generator object Returns204Test.test_delete_unaccessible_stocks.<locals>.<genexpr> at 0x7f10f3088d40>)

Check failure on line 15 in tests/routes/pro/get_offerer_addresses_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerer_addresses_test.py.test_get_offerer_addresses_success

AssertionError: assert [{'id': 684, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 685, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 686, 'label': '3eme adresse', 'street': None, 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 684, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 685, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 686, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': None}]
  
  At index 0 diff: {'id': 684, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 684, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
  
  Full diff:
    [
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 684,
            'isEditable': True,
            'label': '1ere adresse',
  -         'postalCode': '75002',
  ?                            ^
  +         'postalCode': '75000',
  ?                            ^
            'street': '1 boulevard Poissonnière',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 685,
            'isEditable': True,
            'label': '2eme adresse',
            'postalCode': '75007',
            'street': '20 Avenue de Ségur',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 686,
            'isEditable': True,
            'label': '3eme adresse',
            'postalCode': '75008',
            'street': None,
        },
    ]
Raw output
tests/routes/pro/get_offerer_addresses_test.py:56: in test_get_offerer_addresses_success
    assert response.json == [
E   AssertionError: assert [{'id': 684, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 685, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 686, 'label': '3eme adresse', 'street': None, 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 684, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 685, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 686, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': None}]
E     
E     At index 0 diff: {'id': 684, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 684, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
E     
E     Full diff:
E       [
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 684,
E               'isEditable': True,
E               'label': '1ere adresse',
E     -         'postalCode': '75002',
E     ?                            ^
E     +         'postalCode': '75000',
E     ?                            ^
E               'street': '1 boulevard Poissonnière',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 685,
E               'isEditable': True,
E               'label': '2eme adresse',
E               'postalCode': '75007',
E               'street': '20 Avenue de Ségur',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 686,
E               'isEditable': True,
E               'label': '3eme adresse',
E               'postalCode': '75008',
E               'street': None,
E           },
E       ]

Check failure on line 85 in tests/routes/pro/get_offerer_addresses_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerer_addresses_test.py.test_get_offerer_addresses_with_offers

AssertionError: assert [{'id': 688, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 688, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}]
  
  At index 0 diff: {'id': 688, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 688, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
  
  Full diff:
    [
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 688,
            'isEditable': False,
            'label': '1ere adresse',
  -         'postalCode': '75002',
  ?                            ^
  +         'postalCode': '75000',
  ?                            ^
            'street': '1 boulevard Poissonnière',
        },
    ]
Raw output
tests/routes/pro/get_offerer_addresses_test.py:116: in test_get_offerer_addresses_with_offers
    assert response.json == [
E   AssertionError: assert [{'id': 688, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 688, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}]
E     
E     At index 0 diff: {'id': 688, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 688, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
E     
E     Full diff:
E       [
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 688,
E               'isEditable': False,
E               'label': '1ere adresse',
E     -         'postalCode': '75002',
E     ?                            ^
E     +         'postalCode': '75000',
E     ?                            ^
E               'street': '1 boulevard Poissonnière',
E           },
E       ]

Check failure on line 133 in tests/routes/pro/get_offerer_addresses_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerer_addresses_test.py.test_get_offerer_addresses_is_editable[True]

AssertionError: assert [{'id': 690, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'}, {'id': 691, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 692, 'label': '3eme adresse', 'street': '1 rue de la Paix', 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 690, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 691, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 692, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': '1 rue de la Paix'}]
  
  At index 0 diff: {'id': 690, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 690, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
  
  Full diff:
    [
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 690,
            'isEditable': False,
            'label': '1ere adresse',
  -         'postalCode': '75002',
  ?                            ^
  +         'postalCode': '75000',
  ?                            ^
            'street': '1 boulevard Poissonnière',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 691,
            'isEditable': True,
            'label': '2eme adresse',
            'postalCode': '75007',
            'street': '20 Avenue de Ségur',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 692,
            'isEditable': True,
            'label': '3eme adresse',
            'postalCode': '75008',
            'street': '1 rue de la Paix',
        },
    ]
Raw output
tests/routes/pro/get_offerer_addresses_test.py:173: in test_get_offerer_addresses_is_editable
    assert response.json == [
E   AssertionError: assert [{'id': 690, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'}, {'id': 691, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 692, 'label': '3eme adresse', 'street': '1 rue de la Paix', 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 690, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 691, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 692, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': '1 rue de la Paix'}]
E     
E     At index 0 diff: {'id': 690, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': False, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 690, 'isEditable': False, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
E     
E     Full diff:
E       [
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 690,
E               'isEditable': False,
E               'label': '1ere adresse',
E     -         'postalCode': '75002',
E     ?                            ^
E     +         'postalCode': '75000',
E     ?                            ^
E               'street': '1 boulevard Poissonnière',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 691,
E               'isEditable': True,
E               'label': '2eme adresse',
E               'postalCode': '75007',
E               'street': '20 Avenue de Ségur',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 692,
E               'isEditable': True,
E               'label': '3eme adresse',
E               'postalCode': '75008',
E               'street': '1 rue de la Paix',
E           },
E       ]

Check failure on line 133 in tests/routes/pro/get_offerer_addresses_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerer_addresses_test.py.test_get_offerer_addresses_is_editable[False]

AssertionError: assert [{'id': 693, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 694, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 695, 'label': '3eme adresse', 'street': '1 rue de la Paix', 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 693, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 694, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 695, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': '1 rue de la Paix'}]
  
  At index 0 diff: {'id': 693, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 693, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
  
  Full diff:
    [
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 693,
            'isEditable': True,
            'label': '1ere adresse',
  -         'postalCode': '75002',
  ?                            ^
  +         'postalCode': '75000',
  ?                            ^
            'street': '1 boulevard Poissonnière',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 694,
            'isEditable': True,
            'label': '2eme adresse',
            'postalCode': '75007',
            'street': '20 Avenue de Ségur',
        },
        {
            'city': 'Paris',
            'departmentCode': '75',
            'id': 695,
            'isEditable': True,
            'label': '3eme adresse',
            'postalCode': '75008',
            'street': '1 rue de la Paix',
        },
    ]
Raw output
tests/routes/pro/get_offerer_addresses_test.py:173: in test_get_offerer_addresses_is_editable
    assert response.json == [
E   AssertionError: assert [{'id': 693, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 694, 'label': '2eme adresse', 'street': '20 Avenue de Ségur', 'postalCode': '75007', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}, {'id': 695, 'label': '3eme adresse', 'street': '1 rue de la Paix', 'postalCode': '75008', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'}] == [{'city': 'Paris', 'departmentCode': '75', 'id': 693, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}, {'city': 'Paris', 'departmentCode': '75', 'id': 694, 'isEditable': True, 'label': '2eme adresse', 'postalCode': '75007', 'street': '20 Avenue de Ségur'}, {'city': 'Paris', 'departmentCode': '75', 'id': 695, 'isEditable': True, 'label': '3eme adresse', 'postalCode': '75008', 'street': '1 rue de la Paix'}]
E     
E     At index 0 diff: {'id': 693, 'label': '1ere adresse', 'street': '1 boulevard Poissonnière', 'postalCode': '75000', 'city': 'Paris', 'isEditable': True, 'departmentCode': '75'} != {'city': 'Paris', 'departmentCode': '75', 'id': 693, 'isEditable': True, 'label': '1ere adresse', 'postalCode': '75002', 'street': '1 boulevard Poissonnière'}
E     
E     Full diff:
E       [
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 693,
E               'isEditable': True,
E               'label': '1ere adresse',
E     -         'postalCode': '75002',
E     ?                            ^
E     +         'postalCode': '75000',
E     ?                            ^
E               'street': '1 boulevard Poissonnière',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 694,
E               'isEditable': True,
E               'label': '2eme adresse',
E               'postalCode': '75007',
E               'street': '20 Avenue de Ségur',
E           },
E           {
E               'city': 'Paris',
E               'departmentCode': '75',
E               'id': 695,
E               'isEditable': True,
E               'label': '3eme adresse',
E               'postalCode': '75008',
E               'street': '1 rue de la Paix',
E           },
E       ]

Check failure on line 154 in tests/routes/pro/get_offerers_names_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerers_names_test.py.test_get_all_offerers_names

AssertionError: assert 5 == 4
 +  where 5 = len([{'allowedOnAdage': True, 'id': 527, 'name': 'Le Petit Rintintin Management 526'}, {'allowedOnAdage': True, 'id': 823, 'name': 'Le Petit Rintintin Management 822'}, {'allowedOnAdage': True, 'id': 824, 'name': 'Le Petit Rintintin Management 823'}, {'allowedOnAdage': True, 'id': 825, 'name': 'Le Petit Rintintin Management 824'}, {'allowedOnAdage': True, 'id': 826, 'name': 'Le Petit Rintintin Management 825'}])
Raw output
tests/routes/pro/get_offerers_names_test.py:168: in test_get_all_offerers_names
    assert len(response.json["offerersNames"]) == 4
E   AssertionError: assert 5 == 4
E    +  where 5 = len([{'allowedOnAdage': True, 'id': 527, 'name': 'Le Petit Rintintin Management 526'}, {'allowedOnAdage': True, 'id': 823, 'name': 'Le Petit Rintintin Management 822'}, {'allowedOnAdage': True, 'id': 824, 'name': 'Le Petit Rintintin Management 823'}, {'allowedOnAdage': True, 'id': 825, 'name': 'Le Petit Rintintin Management 824'}, {'allowedOnAdage': True, 'id': 826, 'name': 'Le Petit Rintintin Management 825'}])

Check failure on line 175 in tests/routes/pro/get_offerers_names_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offerers_names_test.py.test_get_all_validated_offerers

AssertionError: assert 3 == 2
 +  where 3 = len([{'allowedOnAdage': True, 'id': 527, 'name': 'Le Petit Rintintin Management 526'}, {'allowedOnAdage': True, 'id': 827, 'name': 'Le Petit Rintintin Management 826'}, {'allowedOnAdage': True, 'id': 829, 'name': 'Le Petit Rintintin Management 828'}])
Raw output
tests/routes/pro/get_offerers_names_test.py:189: in test_get_all_validated_offerers
    assert len(response.json["offerersNames"]) == 2
E   AssertionError: assert 3 == 2
E    +  where 3 = len([{'allowedOnAdage': True, 'id': 527, 'name': 'Le Petit Rintintin Management 526'}, {'allowedOnAdage': True, 'id': 827, 'name': 'Le Petit Rintintin Management 826'}, {'allowedOnAdage': True, 'id': 829, 'name': 'Le Petit Rintintin Management 828'}])

Check failure on line 21 in tests/routes/pro/get_offers_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_offers_test.py.should_filter_by_venue_when_user_is_admin_and_request_specific_venue_with_no_rights_on_it

AssertionError: assert [{'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'name': 'My Offer', 'stocks': [{'id': 238, 'hasBookingLimitDatetimePassed': False, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'productIsbn': '123456789', 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name', 'departementCode': '12'}, 'status': 'ACTIVE', 'isShowcase': False, 'address': {'id': 287, 'banId': '75102_7560_00001', 'inseeCode': '75102', 'postalCode': '75000', 'street': '1 boulevard Poissonnière', 'city': 'Paris', 'latitude': 48.87004, 'longitude': 2.3785, 'departmentCode': '75', 'label': 'My public name', 'id_oa': 723, 'isEditable': False, 'isManualEdition': False}}] == [{'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'productIsbn': '123456789', 'name': 'My Offer', 'status': 'ACTIVE', 'stocks': [{'hasBookingLimitDatetimePassed': False, 'id': 238, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'departementCode': '12', 'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name'}, 'isShowcase': False, 'address': {'banId': '75102_7560_00001', 'city': 'Paris', 'departmentCode': '75', 'id': 287, 'id_oa': 723, 'inseeCode': '75102', 'isEditable': False, 'isManualEdition': False, 'label': 'My public name', 'latitude': 48.87004, 'longitude': 2.3785, 'postalCode': '12000', 'street': '1 boulevard Poissonnière'}}]
  
  At index 0 diff: {'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'name': 'My Offer', 'stocks': [{'id': 238, 'hasBookingLimitDatetimePassed': False, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'productIsbn': '123456789', 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name', 'departementCode': '12'}, 'status': 'ACTIVE', 'isShowcase': False, 'address': {'id': 287, 'banId': '75102_7560_00001', 'inseeCode': '75102', 'postalCode': '75000', 'street': '1 boulevard Poissonnière', 'city': 'Paris', 'latitude': 48.87004, 'longitude': 2.3785, 'departmentCode': '75', 'label': 'My public name', 'id_oa': 723, 'isEditable': False, 'isManualEdition': False}} != {'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'productIsbn': '123456789', 'name': 'My Offer', 'status': 'ACTIVE', 'stocks': [{'hasBookingLimitDatetimePassed': False, 'id': 238, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'departementCode': '12', 'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name'}, 'isShowcase': False, 'address': {'banId': '75102_7560_00001', 'city': 'Paris', 'departmentCode': '75', 'id': 287, 'id_oa': 723, 'inseeCode': '75102', 'isEditable': False, 'isManualEdition': False, 'label': 'My public name', 'latitude': 48.87004, 'longitude': 2.3785, 'postalCode': '12000', 'street': '1 boulevard Poissonnière'}}
  
  Full diff:
    [
        {
            'address': {
                'banId': '75102_7560_00001',
                'city': 'Paris',
                'departmentCode': '75',
                'id': 287,
                'id_oa': 723,
                'inseeCode': '75102',
                'isEditable': False,
                'isManualEdition': False,
                'label': 'My public name',
                'latitude': 48.87004,
                'longitude': 2.3785,
  -             'postalCode': '12000',
  ?                            ^^
  +             'postalCode': '75000',
  ?                            ^^
                'street': '1 boulevard Poissonnière',
            },
            'hasBookingLimitDatetimesPassed': False,
            'id': 291,
            'isActive': True,
            'isEditable': True,
            'isEducational': False,
            'isEvent': False,
            'isShowcase': False,
            'isThing': True,
            'name': 'My Offer',
            'productIsbn': '123456789',
            'status': 'ACTIVE',
            'stocks': [
                {
                    'beginningDatetime': None,
                    'bookingQuantity': 0,
                    'hasBookingLimitDatetimePassed': False,
                    'id': 238,
                    'remainingQuantity': 1000,
                },
            ],
            'subcategoryId': 'SUPPORT_PHYSIQUE_FILM',
            'thumbUrl': None,
            'venue': {
                'departementCode': '12',
                'id': 794,
                'isVirtual': False,
                'name': 'My Venue',
                'offererName': 'My Offerer',
                'publicName': 'My public name',
            },
        },
    ]
Raw output
tests/routes/pro/get_offers_test.py:50: in should_filter_by_venue_when_user_is_admin_and_request_specific_venue_with_no_rights_on_it
    assert response.json == [
E   AssertionError: assert [{'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'name': 'My Offer', 'stocks': [{'id': 238, 'hasBookingLimitDatetimePassed': False, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'productIsbn': '123456789', 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name', 'departementCode': '12'}, 'status': 'ACTIVE', 'isShowcase': False, 'address': {'id': 287, 'banId': '75102_7560_00001', 'inseeCode': '75102', 'postalCode': '75000', 'street': '1 boulevard Poissonnière', 'city': 'Paris', 'latitude': 48.87004, 'longitude': 2.3785, 'departmentCode': '75', 'label': 'My public name', 'id_oa': 723, 'isEditable': False, 'isManualEdition': False}}] == [{'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'productIsbn': '123456789', 'name': 'My Offer', 'status': 'ACTIVE', 'stocks': [{'hasBookingLimitDatetimePassed': False, 'id': 238, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'departementCode': '12', 'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name'}, 'isShowcase': False, 'address': {'banId': '75102_7560_00001', 'city': 'Paris', 'departmentCode': '75', 'id': 287, 'id_oa': 723, 'inseeCode': '75102', 'isEditable': False, 'isManualEdition': False, 'label': 'My public name', 'latitude': 48.87004, 'longitude': 2.3785, 'postalCode': '12000', 'street': '1 boulevard Poissonnière'}}]
E     
E     At index 0 diff: {'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'name': 'My Offer', 'stocks': [{'id': 238, 'hasBookingLimitDatetimePassed': False, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'productIsbn': '123456789', 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name', 'departementCode': '12'}, 'status': 'ACTIVE', 'isShowcase': False, 'address': {'id': 287, 'banId': '75102_7560_00001', 'inseeCode': '75102', 'postalCode': '75000', 'street': '1 boulevard Poissonnière', 'city': 'Paris', 'latitude': 48.87004, 'longitude': 2.3785, 'departmentCode': '75', 'label': 'My public name', 'id_oa': 723, 'isEditable': False, 'isManualEdition': False}} != {'hasBookingLimitDatetimesPassed': False, 'id': 291, 'isActive': True, 'isEditable': True, 'isEvent': False, 'isThing': True, 'isEducational': False, 'productIsbn': '123456789', 'name': 'My Offer', 'status': 'ACTIVE', 'stocks': [{'hasBookingLimitDatetimePassed': False, 'id': 238, 'remainingQuantity': 1000, 'beginningDatetime': None, 'bookingQuantity': 0}], 'thumbUrl': None, 'subcategoryId': 'SUPPORT_PHYSIQUE_FILM', 'venue': {'departementCode': '12', 'id': 794, 'isVirtual': False, 'name': 'My Venue', 'offererName': 'My Offerer', 'publicName': 'My public name'}, 'isShowcase': False, 'address': {'banId': '75102_7560_00001', 'city': 'Paris', 'departmentCode': '75', 'id': 287, 'id_oa': 723, 'inseeCode': '75102', 'isEditable': False, 'isManualEdition': False, 'label': 'My public name', 'latitude': 48.87004, 'longitude': 2.3785, 'postalCode': '12000', 'street': '1 boulevard Poissonnière'}}
E     
E     Full diff:
E       [
E           {
E               'address': {
E                   'banId': '75102_7560_00001',
E                   'city': 'Paris',
E                   'departmentCode': '75',
E                   'id': 287,
E                   'id_oa': 723,
E                   'inseeCode': '75102',
E                   'isEditable': False,
E                   'isManualEdition': False,
E                   'label': 'My public name',
E                   'latitude': 48.87004,
E                   'longitude': 2.3785,
E     -             'postalCode': '12000',
E     ?                            ^^
E     +             'postalCode': '75000',
E     ?                            ^^
E                   'street': '1 boulevard Poissonnière',
E               },
E               'hasBookingLimitDatetimesPassed': False,
E               'id': 291,
E               'isActive': True,
E               'isEditable': True,
E               'isEducational': False,
E               'isEvent': False,
E               'isShowcase': False,
E               'isThing': True,
E               'name': 'My Offer',
E               'productIsbn': '123456789',
E               'status': 'ACTIVE',
E               'stocks': [
E                   {
E                       'beginningDatetime': None,
E                       'bookingQuantity': 0,
E                       'hasBookingLimitDatetimePassed': False,
E                       'id': 238,
E                       'remainingQuantity': 1000,
E                   },
E               ],
E               'subcategoryId': 'SUPPORT_PHYSIQUE_FILM',
E               'thumbUrl': None,
E               'venue': {
E                   'departementCode': '12',
E                   'id': 794,
E                   'isVirtual': False,
E                   'name': 'My Venue',
E                   'offererName': 'My Offerer',
E                   'publicName': 'My public name',
E               },
E           },
E       ]

Check failure on line 493 in tests/routes/pro/get_reimbursements_csv_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_reimbursements_csv_test.py.test_with_offer_address_and_venue_address[True-2-1 rue de la paix 75002 Paris0]

assert 2 == 1
 +  where 2 = len([<Booking #117>, <Booking #67>])
Raw output
tests/routes/pro/get_reimbursements_csv_test.py:590: in test_with_offer_address_and_venue_address
    assert len(bookings) == 1
E   assert 2 == 1
E    +  where 2 = len([<Booking #117>, <Booking #67>])

Check failure on line 493 in tests/routes/pro/get_reimbursements_csv_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_reimbursements_csv_test.py.test_with_offer_address_and_venue_address[False-1-1 boulevard Poissonni\xe8re 75000 Paris]

assert 2 == 1
 +  where 2 = len([<Booking #118>, <Booking #67>])
Raw output
tests/routes/pro/get_reimbursements_csv_test.py:590: in test_with_offer_address_and_venue_address
    assert len(bookings) == 1
E   assert 2 == 1
E    +  where 2 = len([<Booking #118>, <Booking #67>])

Check failure on line 493 in tests/routes/pro/get_reimbursements_csv_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/get_reimbursements_csv_test.py.test_with_offer_address_and_venue_address[True-2-1 rue de la paix 75002 Paris1]

assert 2 == 1
 +  where 2 = len([<Booking #119>, <Booking #67>])
Raw output
tests/routes/pro/get_reimbursements_csv_test.py:590: in test_with_offer_address_and_venue_address
    assert len(bookings) == 1
E   assert 2 == 1
E    +  where 2 = len([<Booking #119>, <Booking #67>])

Check failure on line 38 in tests/routes/pro/patch_offerer_address_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/patch_offerer_address_test.py.test_user_cant_change_offerer_address_on_foreign_offerer

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/patch_offerer_address_test.py:55: in test_user_cant_change_offerer_address_on_foreign_offerer
    offerer_address = offerers_models.OffererAddress.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 108 in tests/routes/pro/patch_offerer_address_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/patch_offerer_address_test.py.test_user_can_change_offerer_address_label

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/patch_offerer_address_test.py:125: in test_user_can_change_offerer_address_label
    offerer_address = offerers_models.OffererAddress.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 110 in tests/routes/pro/patch_venue_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/patch_venue_test.py.test_update_venue_location_should_update_venue_offerer_address

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/patch_venue_test.py:146: in test_update_venue_location_should_update_venue_offerer_address
    venue = offerers_models.Venue.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 723 in tests/routes/pro/patch_venue_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/patch_venue_test.py.test_no_venue_contact_created_if_no_data

AssertionError: assert 1 == 0
 +  where 1 = count()
 +    where count = <pcapi.models.pc_object.BaseQuery object at 0x7f10f0278150>.count
 +      where <pcapi.models.pc_object.BaseQuery object at 0x7f10f0278150> = <class 'pcapi.core.offerers.models.VenueContact'>.query
 +        where <class 'pcapi.core.offerers.models.VenueContact'> = offerers_models.VenueContact
Raw output
tests/routes/pro/patch_venue_test.py:735: in test_no_venue_contact_created_if_no_data
    assert offerers_models.VenueContact.query.count() == 0
E   AssertionError: assert 1 == 0
E    +  where 1 = count()
E    +    where count = <pcapi.models.pc_object.BaseQuery object at 0x7f10f0278150>.count
E    +      where <pcapi.models.pc_object.BaseQuery object at 0x7f10f0278150> = <class 'pcapi.core.offerers.models.VenueContact'>.query
E    +        where <class 'pcapi.core.offerers.models.VenueContact'> = offerers_models.VenueContact

Check failure on line 48 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_returned_data

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:63: in test_returned_data
    created_offerer = offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 70 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_user_cant_create_same_offerer_twice

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:85: in test_user_cant_create_same_offerer_twice
    created_offerer = offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 115 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_use_offerer_name_retrieved_from_sirene_api

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:128: in test_use_offerer_name_retrieved_from_sirene_api
    offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 152 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_current_user_has_access_to_created_offerer

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:170: in test_current_user_has_access_to_created_offerer
    offerer = offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 173 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_new_user_offerer_has_validation_status_new

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:193: in test_new_user_offerer_has_validation_status_new
    offerer = offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 250 in tests/routes/pro/post_offerer_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_offerer_test.py.test_saint_martin_offerer_creation_without_postal_code_is_successfull

sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required
Raw output
tests/routes/pro/post_offerer_test.py:279: in test_saint_martin_offerer_creation_without_postal_code_is_successfull
    offerer = offerers_models.Offerer.query.one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/query.py:2870: in one
    return self._iter().one()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:1522: in one
    return self._only_one_row(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/result.py:614: in _only_one_row
    raise exc.MultipleResultsFound(
E   sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required

Check failure on line 33 in tests/routes/pro/post_save_new_onboarding_data_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_save_new_onboarding_data_test.py.test_nominal

sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
DETAIL:  Key (email)=([email protected]) already exists.

[SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
[parameters: {'isActive': True, 'activity': None, 'address': '531 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 73596), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10eea6fa50>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '55781', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
Raw output
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.

The above exception was the direct cause of the following exception:
tests/routes/pro/post_save_new_onboarding_data_test.py:35: in test_nominal
    user = users_factories.UserFactory(email="[email protected]")
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:43: in __call__
    return cls.create(**kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:539: in create
    return cls._generate(enums.CREATE_STRATEGY, kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:60: in _generate
    return super()._generate(strategy, params)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:468: in _generate
    return step.build()
/home/pcapi/.local/lib/python3.11/site-packages/factory/builder.py:274: in build
    instance = self.factory_meta.instantiate(
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:320: in instantiate
    return self.factory._create(model, *args, **kwargs)
src/pcapi/core/users/factories.py:406: in _create
    instance = super()._create(model_class, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:116: in _create
    return cls._save(model_class, session, args, kwargs)
src/pcapi/core/factories.py:53: in _save
    return super()._save(model_class, session, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:127: in _save
    session.commit()
<string>:2: in commit
    ???
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:1454: in commit
    self._transaction.commit(_to_root=self.future)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:832: in commit
    self._prepare_impl()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:811: in _prepare_impl
    self.session.flush()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3449: in flush
    self._flush(objects)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3588: in _flush
    with util.safe_reraise():
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3549: in _flush
    flush_context.execute()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1710: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1577: in _execute_clauseelement
    ret = self._execute_context(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1953: in _execute_context
    self._handle_dbapi_exception(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2134: in _handle_dbapi_exception
    util.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.
E   
E   [SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
E   [parameters: {'isActive': True, 'activity': None, 'address': '531 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 73596), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10eea6fa50>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '55781', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
E   (Background on this error at: https://sqlalche.me/e/14/gkpj)

Check failure on line 79 in tests/routes/pro/post_save_new_onboarding_data_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_save_new_onboarding_data_test.py.test_returns_public_information_only

sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
DETAIL:  Key (email)=([email protected]) already exists.

[SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
[parameters: {'isActive': True, 'activity': None, 'address': '532 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 348100), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10ed1e2c70>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '38280', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
Raw output
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.

The above exception was the direct cause of the following exception:
tests/routes/pro/post_save_new_onboarding_data_test.py:81: in test_returns_public_information_only
    user = users_factories.UserFactory(email="[email protected]")
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:43: in __call__
    return cls.create(**kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:539: in create
    return cls._generate(enums.CREATE_STRATEGY, kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:60: in _generate
    return super()._generate(strategy, params)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:468: in _generate
    return step.build()
/home/pcapi/.local/lib/python3.11/site-packages/factory/builder.py:274: in build
    instance = self.factory_meta.instantiate(
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:320: in instantiate
    return self.factory._create(model, *args, **kwargs)
src/pcapi/core/users/factories.py:406: in _create
    instance = super()._create(model_class, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:116: in _create
    return cls._save(model_class, session, args, kwargs)
src/pcapi/core/factories.py:53: in _save
    return super()._save(model_class, session, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:127: in _save
    session.commit()
<string>:2: in commit
    ???
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:1454: in commit
    self._transaction.commit(_to_root=self.future)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:832: in commit
    self._prepare_impl()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:811: in _prepare_impl
    self.session.flush()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3449: in flush
    self._flush(objects)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3588: in _flush
    with util.safe_reraise():
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3549: in _flush
    flush_context.execute()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1710: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1577: in _execute_clauseelement
    ret = self._execute_context(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1953: in _execute_context
    self._handle_dbapi_exception(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2134: in _handle_dbapi_exception
    util.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.
E   
E   [SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
E   [parameters: {'isActive': True, 'activity': None, 'address': '532 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 348100), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10ed1e2c70>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '38280', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
E   (Background on this error at: https://sqlalche.me/e/14/gkpj)

Check failure on line 92 in tests/routes/pro/post_save_new_onboarding_data_test.py

See this annotation in the file changed.

@github-actions github-actions / Pytest Report

tests/routes/pro/post_save_new_onboarding_data_test.py.test_validated_in_integration

sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
DETAIL:  Key (email)=([email protected]) already exists.

[SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
[parameters: {'isActive': True, 'activity': None, 'address': '533 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 623310), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10ecf5dc80>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '65572', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
Raw output
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.

The above exception was the direct cause of the following exception:
tests/routes/pro/post_save_new_onboarding_data_test.py:95: in test_validated_in_integration
    user = users_factories.UserFactory(email="[email protected]")
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:43: in __call__
    return cls.create(**kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:539: in create
    return cls._generate(enums.CREATE_STRATEGY, kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:60: in _generate
    return super()._generate(strategy, params)
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:468: in _generate
    return step.build()
/home/pcapi/.local/lib/python3.11/site-packages/factory/builder.py:274: in build
    instance = self.factory_meta.instantiate(
/home/pcapi/.local/lib/python3.11/site-packages/factory/base.py:320: in instantiate
    return self.factory._create(model, *args, **kwargs)
src/pcapi/core/users/factories.py:406: in _create
    instance = super()._create(model_class, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:116: in _create
    return cls._save(model_class, session, args, kwargs)
src/pcapi/core/factories.py:53: in _save
    return super()._save(model_class, session, *args, **kwargs)
/home/pcapi/.local/lib/python3.11/site-packages/factory/alchemy.py:127: in _save
    session.commit()
<string>:2: in commit
    ???
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:1454: in commit
    self._transaction.commit(_to_root=self.future)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:832: in commit
    self._prepare_impl()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:811: in _prepare_impl
    self.session.flush()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3449: in flush
    self._flush(objects)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3588: in _flush
    with util.safe_reraise():
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/session.py:3549: in _flush
    flush_context.execute()
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1710: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1577: in _execute_clauseelement
    ret = self._execute_context(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1953: in _execute_context
    self._handle_dbapi_exception(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:2134: in _handle_dbapi_exception
    util.raise_(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/base.py:1910: in _execute_context
    self.dialect.do_execute(
/home/pcapi/.local/lib/python3.11/site-packages/sqlalchemy/engine/default.py:736: in do_execute
    cursor.execute(statement, parameters)
E   sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "user_email_key"
E   DETAIL:  Key (email)=([email protected]) already exists.
E   
E   [SQL: INSERT INTO "user" ("isActive", activity, address, city, civility, comment, "culturalSurveyFilledDate", "culturalSurveyId", "dateCreated", "dateOfBirth", "departementCode", email, "externalIds", "extraData", "firstName", "hasSeenProTutorials", "idPieceNumber", "ineHash", "irisFranceId", "isEmailValidated", "lastConnectionDate", "lastName", married_name, "needsToFillCulturalSurvey", "notificationSubscriptions", password, "phoneNumber", "phoneValidationStatus", "postalCode", "recreditAmountToShow", roles, "schoolType", "validatedBirthDate") VALUES (%(isActive)s, %(activity)s, %(address)s, %(city)s, %(civility)s, %(comment)s, %(culturalSurveyFilledDate)s, %(culturalSurveyId)s, %(dateCreated)s, %(dateOfBirth)s, %(departementCode)s, %(email)s, %(externalIds)s, %(extraData)s, %(firstName)s, %(hasSeenProTutorials)s, %(idPieceNumber)s, %(ineHash)s, %(irisFranceId)s, %(isEmailValidated)s, %(lastConnectionDate)s, %(lastName)s, %(married_name)s, %(needsToFillCulturalSurvey)s, %(notificationSubscriptions)s, %(password)s, %(phoneNumber)s, %(phoneValidationStatus)s, %(postalCode)s, %(recreditAmountToShow)s, %(roles)s::VARCHAR(20)[], %(schoolType)s, %(validatedBirthDate)s) RETURNING "user".id]
E   [parameters: {'isActive': True, 'activity': None, 'address': '533 place des noces rouges', 'city': 'La Rochelle', 'civility': None, 'comment': None, 'culturalSurveyFilledDate': None, 'culturalSurveyId': None, 'dateCreated': datetime.datetime(2024, 9, 19, 12, 23, 31, 623310), 'dateOfBirth': datetime.date(1984, 9, 19), 'departementCode': None, 'email': '[email protected]', 'externalIds': '{}', 'extraData': '{}', 'firstName': 'Jean', 'hasSeenProTutorials': True, 'idPieceNumber': None, 'ineHash': None, 'irisFranceId': None, 'isEmailValidated': True, 'lastConnectionDate': None, 'lastName': 'Neige', 'married_name': None, 'needsToFillCulturalSurvey': True, 'notificationSubscriptions': '{"marketing_push": true, "marketing_email": true, "subscribed_themes": []}', 'password': <psycopg2.extensions.Binary object at 0x7f10ecf5dc80>, 'phoneNumber': None, 'phoneValidationStatus': None, 'postalCode': '65572', 'recreditAmountToShow': None, 'roles': [], 'schoolType': None, 'validatedBirthDate': None}]
E   (Background on this error at: https://sqlalche.me/e/14/gkpj)