Skip to content

Commit

Permalink
get rid of assertIsInstance for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
stebunovd committed Jan 27, 2013
1 parent 46e11ec commit 40d574c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions readme.rst
@@ -1,6 +1,9 @@
Unipag.py - Unipag Client for Python
====================================

.. image:: https://travis-ci.org/unipag/unipag-python.png?branch=master
:target: https://travis-ci.org/unipag/unipag-python

Installation
------------

Expand Down
10 changes: 5 additions & 5 deletions tests.py
Expand Up @@ -10,15 +10,15 @@ def setUp(self):

def test_get_connections(self):
connections = unipag.Connection.list()
self.assertIsInstance(connections, list)
self.assertTrue(isinstance(connections, list))
self.assertGreater(len(connections), 0)
for conn in connections:
self.assertIsInstance(conn, unipag.Connection)
self.assertTrue(isinstance(conn, unipag.Connection))

def test_invoices(self):
invoice = unipag.Invoice(amount=1, currency='USD').save()
invoice2 = unipag.Invoice.get(id=invoice.id)
self.assertIsInstance(invoice2, unipag.Invoice)
self.assertTrue(isinstance(invoice2, unipag.Invoice))
self.assertEqual(invoice, invoice2)
invoice2.delete()
self.assertFalse(invoice.deleted)
Expand All @@ -43,8 +43,8 @@ def test_payments(self):
)
# Check that only payments linked to invoice are returned
payments = unipag.Payment.list(invoice=invoice.id)
self.assertIsInstance(payments, list)
self.assertTrue(isinstance(payments, list))
self.assertEqual(len(payments), 3)
for p in payments:
self.assertIsInstance(p, unipag.Payment)
self.assertTrue(isinstance(p, unipag.Payment))
self.assertEqual(p.invoice, invoice.id)

0 comments on commit 40d574c

Please sign in to comment.