Exemplo n.º 1
0
    def test_symmetric_very_not_equal(self):
        db_balance = Balance({'USD': Money('50', 'USD'), 'BTC': Money('0', 'BTC')})

        ledger_balance = Balance({
            'USD': Money('-60', 'USD'),
            'BTC': Money('100', 'BTC'),
        })

        auditing.balance_equality(db_balance, ledger_balance).should.equal(False)
Exemplo n.º 2
0
    def test_complex_asymmetric_equal(self):
        db_balance = Balance({
            'USD': Money('50', 'USD'),
            'CAD': Money('10000', 'CAD'),
            'ETH': Money('0', 'ETH'),
            'BTC': Money('0', 'BTC'),
        })

        ledger_balance = Balance({
            'USD': Money('50', 'USD'),
            'CAD': Money('10000', 'CAD'),
        })

        auditing.balance_equality(db_balance, ledger_balance).should.equal(True)
Exemplo n.º 3
0
    def test_symmetric_equal(self):
        db_balance = Balance({'USD': Money('50', 'USD'), 'BTC': Money('0', 'BTC')})
        ledger_balance = Balance({'USD': Money('50', 'USD'), 'BTC': Money('0', 'BTC')})

        auditing.balance_equality(db_balance, ledger_balance).should.equal(True)
Exemplo n.º 4
0
    def test_trivial(self):
        db_balance = Balance()
        ledger_balance = Balance()

        auditing.balance_equality(db_balance, ledger_balance).should.equal(True)