def test_Multiplication(self): five = Money.dollar(5) self.assertEquals( Money.dollar(10), five.times(2), "5$*2==10$" ) self.assertEquals( Money.dollar(15), five.times(3), "5$*3==15$" )
# To change this template, choose Tools | Templates # and open the template in the editor. from Dollar import Money dollar = Money.dollar(1) print dollar.__dict__ if __name__ == "__main__": print "Hello World"
def test_Currency(self): self.assertEqual("USD", Money.dollar(1).currency(), '"USD" == money.dollar(1).currency') self.assertEqual("CHF", Money.franc(1).currency(), '"CHF" == money.franc(1).currency')