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

Commit

Permalink
Assert that we split up line items into the appropriate counts per pr…
Browse files Browse the repository at this point in the history
…ovider
  • Loading branch information
justinvdm committed Jan 30, 2015
1 parent 89e1c12 commit ea80dab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions go/billing/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,10 @@ def test_generate_monthly_statement_providers_inbound(self):
description__startswith='Messages received')

self.assertEqual(item1.description, 'Messages received - Provider 1')
self.assertEqual(item1.units, 2)

self.assertEqual(item2.description, 'Messages received - Provider 2')
self.assertEqual(item2.units, 1)

@mock.patch('go.billing.settings.PROVIDERS', {'provider1': 'Provider 1'})
def test_generate_monthly_statement_unknown_provider_inbound(self):
Expand Down Expand Up @@ -633,7 +636,10 @@ def test_generate_monthly_statement_providers_outbound(self):
description__startswith='Messages sent')

self.assertEqual(item1.description, 'Messages sent - Provider 1')
self.assertEqual(item1.units, 2)

self.assertEqual(item2.description, 'Messages sent - Provider 2')
self.assertEqual(item2.units, 1)

@mock.patch('go.billing.settings.PROVIDERS', {'provider1': 'Provider 1'})
def test_generate_monthly_statement_unknown_provider_outbound(self):
Expand Down Expand Up @@ -703,10 +709,14 @@ def test_generate_monthly_statement_providers_sessions(self):
item1.description,
'Sessions (billed per session) - Provider 1')

self.assertEqual(item1.units, 2)

self.assertEqual(
item2.description,
'Sessions (billed per session) - Provider 2')

self.assertEqual(item2.units, 1)

@mock.patch('go.billing.settings.PROVIDERS', {'provider1': 'Provider 1'})
def test_generate_monthly_statement_unknown_provider_sessions(self):
mk_transaction(
Expand Down

0 comments on commit ea80dab

Please sign in to comment.