Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Constrain payday payouts #3438

Merged
merged 6 commits into from
May 15, 2015
Merged

Constrain payday payouts #3438

merged 6 commits into from
May 15, 2015

Conversation

rohitpaulk
Copy link
Contributor

@rohitpaulk rohitpaulk force-pushed the constrain-payday-payouts branch from e35d772 to 5293aa4 Compare May 15, 2015 17:18
@chadwhitacre
Copy link
Contributor

@rohitpaulk Is it obvious to you why 62fe524 is failing?

@chadwhitacre
Copy link
Contributor

I get:

_____________________________________ TestPayout.test_payout_can_pay_out _____________________________________
Traceback (most recent call last):
  File "/Users/whit537/personal/gratipay/gratipay.com/env/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/Users/whit537/personal/gratipay/gratipay.com/tests/py/test_billing_payday.py", line 523, in test_payout_can_pay_out
    Payday.start().payout()
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/billing/payday.py", line 444, in payout
    self.db.self_check()
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/models/__init__.py", line 31, in self_check
    check_db(cursor)
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/models/__init__.py", line 37, in check_db
    _check_balances(cursor)
  File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/models/__init__.py", line 120, in _check_balances
    assert len(b) == 0, "conflicting balances: {}".format(b)
AssertionError: conflicting balances: [Record(username=u'alice', expected=Decimal('-20.00'), actual=Decimal('0.00'))]

@rohitpaulk
Copy link
Contributor Author

Is it obvious to you why 62fe524 is failing?

Yes, we created a participant with a positive balance, but didn't create a corresponding exchange.

@rohitpaulk
Copy link
Contributor Author

Fixing...

@rohitpaulk rohitpaulk mentioned this pull request May 15, 2015
I don't know how to compare the call args, @whit537 - Python Lesson Time! :D
@rohitpaulk rohitpaulk force-pushed the constrain-payday-payouts branch from 0a8d03b to 1e069e8 Compare May 15, 2015 18:16
@chadwhitacre
Copy link
Contributor

Ah, like pry for ruby :)

:)

chadwhitacre added a commit that referenced this pull request May 15, 2015
@chadwhitacre chadwhitacre merged commit 063a4cd into master May 15, 2015
@chadwhitacre chadwhitacre deleted the constrain-payday-payouts branch May 15, 2015 18:29
@chadwhitacre
Copy link
Contributor

!m @rohitpaulk

Okay! Back to #3415 ...

chadwhitacre added a commit that referenced this pull request May 15, 2015
This uses the same condition we added to Payday.payout in #3438.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants