'Test transaction model'

def test_model_transaction(self):

    contact_type = ContactType(name='test')
    contact_type.save()
    contact = Contact(name='test', contact_type=contact_type)
    contact.save()
    currency = Currency(code='GBP', name='Pounds', symbol='L', is_default=True)
    currency.save()
    account = Account(name='test', owner=contact, balance_currency=currency)
    account.save()
    obj = Transaction(name='test', account=account, source=contact, target=contact, value=10, value_currency=currency)
    obj.save()
    self.assertEquals('test', obj.name)
    self.assertNotEquals(obj.id, None)
    obj.delete()
