def test_get_account_sequence(self): mock = MockObject() fun = lambda *_: mock # the library we use uses the builder pattern mock.account_id = fun mock.call = lambda *_: self.sample_account_response self.provider.server.accounts = fun self.assertEqual(113942965513805922, self.provider.get_account_sequence('XXX'))
def test_get_balance(self): mock = MockObject() fun = lambda *_: mock # the library we use uses the builder pattern mock.account_id = fun mock.call = lambda *_: self.sample_account_response self.provider.server.accounts = fun self.assertEqual('25.0779942', self.provider.get_balance('XXX'))