diff --git a/django_ledger/tests/test_bill.py b/django_ledger/tests/test_bill.py index a4b7fa3c5..70d60a912 100644 --- a/django_ledger/tests/test_bill.py +++ b/django_ledger/tests/test_bill.py @@ -366,14 +366,13 @@ def test_bill_detail(self): # amount paid is shown self.assertContains(bill_detail_response, 'id="djl-bill-detail-amount-paid"') - # amount owed is shown - self.assertContains(bill_detail_response, 'id="djl-bill-detail-amount-owed"') - if not bill_model.accrue: # amount prepaid is not shown self.assertNotContains(bill_detail_response, ' id="djl-bill-detail-amount-prepaid"') # amount unearned is not shown self.assertNotContains(bill_detail_response, ' id="djl-bill-detail-amount-unearned"') + # amount owed is shown + self.assertContains(bill_detail_response, 'id="djl-bill-detail-amount-owed"') else: # amount prepaid is shown diff --git a/django_ledger/tests/test_transactions.py b/django_ledger/tests/test_transactions.py index 7fd20555f..e73f45571 100644 --- a/django_ledger/tests/test_transactions.py +++ b/django_ledger/tests/test_transactions.py @@ -68,11 +68,13 @@ def test_blank_data(self): self.assertFalse(form.is_valid(), msg='Form without data is supposed to be invalid') def test_invalid_account(self): - with self.assertRaises(ObjectDoesNotExist): - form = TransactionModelForm({ - 'account': 'Asset', - }) - form.is_valid() + form = TransactionModelForm({ + 'account': 'Asset', + 'tx_type': 'debit', + 'amount': Decimal(randint(10000, 99999)), + 'description': 'Bought Something Else ...' + }) + self.assertIn('“Asset” is not a valid UUID.', form.errors.as_text()) class TransactionModelFormSetTest(DjangoLedgerBaseTest):