typecasting.py
318 Bytes
from tests.client import TestClient
class TestTypeCasting(TestClient):
def test_format(self):
curr = self.client.call('shop/currency', {'id': 'usd'})
self.assertIsInstance(curr.id, int)
# self.assertIsInstance(curr.name, basestring)
self.assertIsInstance(curr.usdvalue, float)