Ejemplo n.º 1
0
 def setUp(self):
     self.cc = CreditCard(
         type = "mastercard",
         owner = "John Doe",
         number = "4711",
         expiration_date_month = 8,
         expiration_date_year = 2012
     )
Ejemplo n.º 2
0
class CreditCardTestCase(TestCase):
    def setUp(self):
        self.cc = CreditCard(
            type = "mastercard",
            owner = "John Doe",
            number = "4711",
            expiration_date_month = 8,
            expiration_date_year = 2012
        )

    def test_unicode(self):
        self.assertEquals(self.cc.__unicode__(), "%s / %s" % (self.cc.type, self.cc.owner))