diff --git a/tests/test_functions.py b/tests/test_functions.py index 219218a..b46d0db 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -133,9 +133,19 @@ class FunctionsTestCase(IsolatedAsyncioTestCase): function = functions.get_cash_flow_statement else: raise ValueError - output = await function(symbol, quarterly, mock_session) + output = await function(symbol, quarterly=quarterly, session=mock_session) self.assertEqual(expected_output, output) mock__get_financial_statement.assert_called_once_with(statement, symbol, quarterly, mock_session) + mock__get_financial_statement.reset_mock() + + symbol1, symbol2 = 'x', 'y' + expected_output = {symbol1: expected_output, symbol2: expected_output} + output = await function(symbol1, symbol2, quarterly=quarterly, session=mock_session) + self.assertDictEqual(expected_output, output) + mock__get_financial_statement.assert_has_calls([ + call(statement, symbol1, quarterly, mock_session), + call(statement, symbol2, quarterly, mock_session), + ]) @patch.object(functions, '_get_financial_statement') async def test_get_balance_sheet(self, mock__get_financial_statement):