Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
8eth committed Oct 31, 2024
1 parent c5f7596 commit 5012909
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/fixtures/plan/created.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Content-Type: application/xml; charset=utf-8
<unit_amount_in_cents>
<USD type="integer">1000</USD>
</unit_amount_in_cents>
<vertex_transaction_type>sale</vertex_transaction_type>
</plan>

HTTP/1.1 201 Created
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/plan/updated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Content-Type: application/xml; charset=utf-8
<unit_amount_in_cents>
<USD type="integer">2000</USD>
</unit_amount_in_cents>
<vertex_transaction_type>sale</vertex_transaction_type>
</plan>

HTTP/1.1 200 OK
Expand Down
3 changes: 3 additions & 0 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,7 @@ def test_plan(self):
unit_amount_in_cents=Money(1000),
total_billing_cycles=10,
custom_fields=[CustomField(name='food', value='pizza')],
vertex_transaction_type='sale'
)
with self.mock_request('plan/created.xml'):
plan.save()
Expand All @@ -2082,6 +2083,7 @@ def test_plan(self):
self.assertIsInstance(plan.custom_fields[0], CustomField)
self.assertEqual(plan.custom_fields[0].name, 'food')
self.assertEqual(plan.custom_fields[0].value, 'pizza')
self.assertEqual(plan.vertex_transaction_type, 'sale')

with self.mock_request('plan/exists.xml'):
same_plan = Plan.get(plan_code)
Expand All @@ -2105,6 +2107,7 @@ def test_plan(self):
with self.mock_request('plan/show-taxed.xml'):
plan = Plan.get(plan_code)
self.assertTrue(plan.tax_exempt)
self.assertEqual(plan.vertex_transaction_type, 'sale')

def test_plan_with_ramps(self):
plan_code = 'plan%s' % self.test_id
Expand Down

0 comments on commit 5012909

Please sign in to comment.