================================================================================ COMMAND EXECUTION HISTORY ================================================================================ Conversation: Backend Implementation Command: DJANGO_ENV=development python backend/manage.py test apps.investments.tests.test_calculate_rewards Category: Test Working Directory: /home/cursorai/projects/telegram-earn ================================================================================ EXECUTION - 2025-12-10 03:06:23 ================================================================================ Status: FAILED Exit Code: 1 Execution Time: 2.51 seconds -------------------------------------------------------------------------------- STDOUT -------------------------------------------------------------------------------- Found 4 test(s). System check identified no issues (0 silenced). Rewards created: 1, commissions created: 3 Rewards created: 1, commissions created: 3 Rewards created: 0, commissions created: 0 Rewards created: 1, commissions created: 3 Rewards created: 0, commissions created: 0 -------------------------------------------------------------------------------- STDERR -------------------------------------------------------------------------------- Creating test database for alias 'default'... FF.. ====================================================================== FAIL: test_creates_reward_commissions_and_transactions (apps.investments.tests.test_calculate_rewards.CalculateRewardsCommandTests.test_creates_reward_commissions_and_transactions) Command credits reward to investor and commissions up the chain. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cursorai/projects/telegram-earn/backend/apps/investments/tests/test_calculate_rewards.py", line 89, in test_creates_reward_commissions_and_transactions self.assertEqual(self.upline1.credit_balance, Decimal("10.00000000")) AssertionError: Decimal('4.00000000') != Decimal('10.00000000') ====================================================================== FAIL: test_idempotent_for_existing_reward (apps.investments.tests.test_calculate_rewards.CalculateRewardsCommandTests.test_idempotent_for_existing_reward) Running the command twice should not duplicate rewards or commissions. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cursorai/projects/telegram-earn/backend/apps/investments/tests/test_calculate_rewards.py", line 130, in test_idempotent_for_existing_reward self.assertEqual(self.upline1.credit_balance, Decimal("10.00000000")) AssertionError: Decimal('4.00000000') != Decimal('10.00000000') ---------------------------------------------------------------------- Ran 4 tests in 0.094s FAILED (failures=2) Destroying test database for alias 'default'...