diff --git a/tests/test_functions.py b/tests/test_functions.py index f0c7bf2..4af897b 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -63,7 +63,7 @@ class FunctionsTestCase(IsolatedAsyncioTestCase): def test_extract_row_data(self): test_row = self.test_soup.find('div', attrs={'class': 'financials'}).tbody.tr - expected_output = ('foo', (1., -2.)) + expected_output = ('foo', (1, 1., -2.)) output = functions.extract_row_data(test_row) self.assertTupleEqual(expected_output, output) @@ -197,9 +197,24 @@ class FunctionsTestCase(IsolatedAsyncioTestCase): symbol = 'foo' # Since the web request is mocked we always receive the same HTML markup. expected_output = { - BS: {END_DATE: ('End_Date_1', 'End_Date_2'), 'foo': (1., -2.), 'bar': (2., -3.)}, - IS: {END_DATE: ('End_Date_1', 'End_Date_2'), 'foo': (1., -2.), 'bar': (2., -3.)}, - CF: {END_DATE: ('End_Date_1', 'End_Date_2'), 'foo': (1., -2.), 'bar': (2., -3.)} + BS: { + END_DATE: ('End_Date_1', 'End_Date_2'), + 'foo': (1, 1., -2.), + 'bar': (2, 2., -3.), + 'baz': (3, 3., -4.) + }, + IS: { + END_DATE: ('End_Date_1', 'End_Date_2'), + 'foo': (1, 1., -2.), + 'bar': (2, 2., -3.), + 'baz': (3, 3., -4.) + }, + CF: { + END_DATE: ('End_Date_1', 'End_Date_2'), + 'foo': (1, 1., -2.), + 'bar': (2, 2., -3.), + 'baz': (3, 3., -4.) + } } output = await functions.get_all_financials(symbol, session=mock_session_obj) self.assertDictEqual(expected_output, output) diff --git a/tests/test_structure.html b/tests/test_structure.html index 95630f4..0d607ea 100644 --- a/tests/test_structure.html +++ b/tests/test_structure.html @@ -15,7 +15,7 @@ - + @@ -23,17 +23,23 @@ - + - + + + + + + +
!!Item
!!Item
!!Item
!!Item
End_Date_1
End_Date_2
foo
foo
foo
foo
bar
bar
bar
bar
baz
baz