From 7f4d1d89c8a976cb5e314bcfc28b37bace7faa3b Mon Sep 17 00:00:00 2001 From: Sumin Byeon Date: Mon, 16 May 2022 22:51:29 +0900 Subject: [PATCH] Skip broken test cases Some of them shall be deprecated --- finance/providers/kofia.py | 1 + tests/test___main__.py | 4 +++- tests/test_providers.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/finance/providers/kofia.py b/finance/providers/kofia.py index e12757d..88d978c 100644 --- a/finance/providers/kofia.py +++ b/finance/providers/kofia.py @@ -69,6 +69,7 @@ def get_request_body(self, code, from_date, to_date): to_date=to_date.strftime(DATE_FORMAT), ) + # TODO: An empty XML body is returned. This needs to be fixed. def fetch_data(self, code, from_date, to_date): """Fetch data from the provider. diff --git a/tests/test___main__.py b/tests/test___main__.py index 03d7db6..cb345cc 100644 --- a/tests/test___main__.py +++ b/tests/test___main__.py @@ -51,7 +51,8 @@ def test_import_sp500_records(): assert result.exit_code == 0 -def test_import_fund(asset_sp500): +@pytest.mark.skip(reason="It appears Kofia API has been changed.") +def test_import_fund(asset_krw, asset_sp500): runner = CliRunner() result = runner.invoke(import_fund, ["KR5223941018", "2016-01-01", "2016-01-31"]) assert result.exit_code == 0 @@ -63,6 +64,7 @@ def test_import_non_existing_fund(): assert isinstance(result.exception, AssetNotFoundException) +@pytest.mark.skip(reason="Yahoo Finance provider is scheduled to be deprecated.") def test_fetch_stock_values(): runner = CliRunner() result = runner.invoke( diff --git a/tests/test_providers.py b/tests/test_providers.py index 6c733d6..e1c741e 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -68,6 +68,7 @@ def test_kofia_get_request_body(): assert "20160603" in body +@pytest.mark.skip(reason="Kofia API needs to be investigated.") def test_kofia_fetch_data(): provider = Kofia() from_date, to_date = parse_date("2016-05-01"), parse_date("2016-05-30")