Esempio n. 1
0
    def test_currency_from_to_does_not_exist(self):
        """

        """
        value_date = datetime(1995, 1, 1)
        rate = convert.currency_from_to('USD', 'UGX', value_date, 100)
        self.assertEqual(rate, 0)
Esempio n. 2
0
 def test_currency_from_to_xdr(self):
     """
         when converted to xdr, only to_xdr should be called.
     """
     value_date = datetime(1994, 1, 1)
     rate = convert.currency_from_to('USD', 'XDR', value_date, 100)
     self.assertEqual(rate, 300)
Esempio n. 3
0
    def test_currency_from_to(self):
        """

        """
        value_date = datetime(1994, 1, 1)
        rate = convert.currency_from_to('USD', 'EUR', value_date, 200)
        self.assertEqual(rate, 400)
Esempio n. 4
0
    def test_currency_from_to_does_not_exist(self):
        """

        """
        value_date = datetime(1995, 1, 1)
        rate = convert.currency_from_to('USD', 'UGX', value_date, 100)
        self.assertEqual(rate, 0)
Esempio n. 5
0
 def test_currency_from_to_xdr(self):
     """
         when converted to xdr, only to_xdr should be called.
     """
     value_date = datetime(1994, 1, 1)
     rate = convert.currency_from_to('USD', 'XDR', value_date, 100)
     self.assertEqual(rate, 300)
Esempio n. 6
0
    def test_currency_from_to(self):
        """

        """
        value_date = datetime(1994, 1, 1)
        rate = convert.currency_from_to('USD', 'EUR', value_date, 200)
        self.assertEqual(rate, 400)