Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure : FAIL: test_bill_detail (django_ledger.tests.test_bill.BillModelTests.test_bill_detail) #221

Open
tolland opened this issue Aug 3, 2024 · 2 comments
Labels
bug Something isn't working low impact Low impact issue.

Comments

@tolland
Copy link
Contributor

tolland commented Aug 3, 2024

Describe the bug
Run the tests from the develop branch some are failing, this one on a template issue:

$ python manage.py test django_ledger.tests.test_bill.BillModelTests.test_bill_detail
Found 1 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
08/03/2024 01:19:00 AM Populating Entity Testing Inc-626038...
F
======================================================================
FAIL: test_bill_detail (django_ledger.tests.test_bill.BillModelTests.test_bill_detail)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user1/git/django-ledger/django_ledger/tests/test_bill.py", line 370, in test_bill_detail
    self.assertContains(bill_detail_response, 'id="djl-bill-detail-amount-owed"')
  File "/home/user1/.local/share/virtualenvs/django-ledger-azuD17Ir/lib/python3.11/site-packages/django/test/testcases.py", line 537, in assertContains
    self.assertTrue(
AssertionError: False is not true : Couldn't find 'id="djl-bill-detail-amount-owed"' in response

----------------------------------------------------------------------
Ran 1 test in 11.594s

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux
  • Browser firefox
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@tolland
Copy link
Contributor Author

tolland commented Aug 3, 2024

It's happening because the string its looking for is in the conditional block that requires the bill model to be accrue == True
https://github.com/arrobalytics/django-ledger/blob/develop/django_ledger/templates/django_ledger/bills/bill_detail.html#L68-L76

@tolland
Copy link
Contributor Author

tolland commented Aug 3, 2024

@elarroba elarroba added bug Something isn't working low impact Low impact issue. labels Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low impact Low impact issue.
Projects
None yet
Development

No branches or pull requests

2 participants