Skip to content

Commit

Permalink
updated emoney tests
Browse files Browse the repository at this point in the history
Co-authored-by: Iulian Masar <[email protected]>
  • Loading branch information
iulian03 and Iulian Masar authored Feb 25, 2025
1 parent c294acb commit ac83332
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/test_emoney.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
from mangopay.resources import EMoney
from tests.test_base import BaseTestLive


Expand All @@ -8,14 +7,20 @@ class EMoneyTest(BaseTestLive):
def test_retrieve_emoney(self):
john = self.get_john()
emoney = john.get_emoney()
self.assertIsNotNone(emoney)
self.assertResponse(emoney)

def test_retrieve_emoney_for_year(self):
john = self.get_john()
emoney = john.get_emoney(**{'year': 2019})
self.assertIsNotNone(emoney)
self.assertResponse(emoney)

def test_retrieve_emoney_for_month(self):
john = self.get_john()
emoney = john.get_emoney(**{'year': 2019, 'month': 4})
self.assertIsNotNone(emoney)
self.assertResponse(emoney)

def assertResponse(self, emoney_response):
self.assertIsNotNone(emoney_response)
self.assertTrue(len(emoney_response.data) > 0)
self.assertIsNotNone(emoney_response.data[0].credited_emoney)
self.assertIsNotNone(emoney_response.data[0].debited_emoney)

0 comments on commit ac83332

Please sign in to comment.