Esempio n. 1
0
    def test_owner_delete_signal(self):

        owner = UserFactory()
        bankaccount = BankAccountFactory(owners=[owner])

        owner.delete()
        with self.assertRaises(BankAccount.DoesNotExist):
            bankaccount.refresh_from_db()
Esempio n. 2
0
    def test_delete_owner(self):

        owner = UserFactory(username='******')
        banktransactiontag = BankTransactionTagFactory(owner=owner)

        owner.delete()
        with self.assertRaises(BankTransactionTag.DoesNotExist):
            banktransactiontag.refresh_from_db()