Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master #107

Merged
merged 14 commits into from
Dec 4, 2017
Merged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ avoid namespace collisions and to have more consistency with Pinax.

## Pinax

Pinax is an open-source platform built on the Django Web Framework. It is an ecosystem of reusable Django apps, themes, and starter project templates.
Pinax is an open-source platform built on the Django Web Framework. It is an ecosystem of reusable Django apps and starter project templates.
This collection can be found at http://pinaxproject.com.

This app was developed as part of the Pinax ecosystem but is just a Django app and can be used independently of other Pinax apps.
Expand Down
12 changes: 6 additions & 6 deletions pinax/stripe/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ def test_plan_str_jpy(self):
p = Plan(amount=decimal.Decimal("5"), name="My Plan", currency="jpy", interval="monthly", interval_count=1)
self.assertTrue(u"\u00a5" in _str(p))

def test_plan_per_account(self):
Plan.objects.create(stripe_id="plan", amount=decimal.Decimal("100"), interval="monthly", interval_count=1)
account = Account.objects.create(stripe_id="acct_A")
Plan.objects.create(stripe_id="plan", stripe_account=account, amount=decimal.Decimal("100"), interval="monthly", interval_count=1)
self.assertEquals(Plan.objects.count(), 2)

@patch("stripe.Plan.retrieve")
def test_plan_stripe_plan(self, RetrieveMock):
c = Plan(stripe_id="plan")
Expand All @@ -81,6 +75,12 @@ def test_plan_stripe_plan_with_account(self, RetrieveMock):
self.assertTrue(RetrieveMock.call_args_list, [
call("plan", stripe_account="acct_A")])

def test_plan_per_account(self):
Plan.objects.create(stripe_id="plan", amount=decimal.Decimal("100"), interval="monthly", interval_count=1)
account = Account.objects.create(stripe_id="acct_A")
Plan.objects.create(stripe_id="plan", stripe_account=account, amount=decimal.Decimal("100"), interval="monthly", interval_count=1)
self.assertEquals(Plan.objects.count(), 2)

def test_event_processing_exception_str(self):
e = EventProcessingException(data="hello", message="hi there", traceback="fake")
self.assertTrue("Event=" in str(e))
Expand Down