def valid_result_raises_no_exceptions_test(self): def callback(resource, api_version, query_params): return json.loads(self.__VALID_RESULT) connection = MockConnection(callback) a = Account(connection, 1) a.portfolios()
def no_portfolios_returns_empty_list_test(self): def callback(resource, api_version, query_params): return json.loads('{}') connection = MockConnection(callback) a = Account(connection, 1) result = a.portfolios() self.assertEquals(list, type(result)) self.assertEquals(0, len(result))