================================================================================ COMMAND EXECUTION HISTORY ================================================================================ Conversation: Backend Implementation Command: DJANGO_ENV=development python backend/manage.py test apps.payments.tests Category: Test Working Directory: /home/cursorai/projects/telegram-earn ================================================================================ EXECUTION - 2025-12-10 03:30:46 ================================================================================ Status: FAILED Exit Code: 1 Execution Time: 3.58 seconds -------------------------------------------------------------------------------- STDOUT -------------------------------------------------------------------------------- Found 4 test(s). System check identified no issues (0 silenced). -------------------------------------------------------------------------------- STDERR -------------------------------------------------------------------------------- Creating test database for alias 'default'... .E.. ====================================================================== ERROR: test_deposit_unique_per_chain_and_defaults (apps.payments.tests.test_models.PaymentsModelTests.test_deposit_unique_per_chain_and_defaults) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 105, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 360, in execute return super().execute(query, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sqlite3.IntegrityError: UNIQUE constraint failed: payment_deposits.transaction_hash, payment_deposits.blockchain The above exception was the direct cause of the following exception: django.db.utils.IntegrityError: UNIQUE constraint failed: payment_deposits.transaction_hash, payment_deposits.blockchain The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/cursorai/projects/telegram-earn/backend/apps/payments/tests/test_models.py", line 80, in test_deposit_unique_per_chain_and_defaults other_address = PaymentAddress.objects.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/query.py", line 665, in create obj.save(force_insert=True, using=self.db) File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/base.py", line 902, in save self.save_base( File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1008, in save_base updated = self._save_table( ^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1169, in _save_table results = self._do_insert( ^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/base.py", line 1210, in _do_insert return manager._insert( ^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/query.py", line 1873, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1882, in execute_sql cursor.execute(sql, params) File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 79, in execute return self._execute_with_wrappers( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers return executor(sql, params, many, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/utils.py", line 99, in _execute self.db.validate_no_broken_transaction() File "/home/cursorai/projects/telegram-earn/backend/venv/lib/python3.12/site-packages/django/db/backends/base/base.py", line 521, in validate_no_broken_transaction raise TransactionManagementError( django.db.transaction.TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block. ---------------------------------------------------------------------- Ran 4 tests in 0.046s FAILED (errors=1) Destroying test database for alias 'default'...