From 1efbbef07ebb9e3e18edbbd0a5fae01b3e0c7aef Mon Sep 17 00:00:00 2001 From: niv vaknin Date: Sun, 29 Dec 2024 12:11:31 +0200 Subject: [PATCH] Fix tests --- Quorum/tests/checks/__init__.py | 0 Quorum/tests/{checks => }/test_checks.py | 2 +- Quorum/tests/{checks => }/test_price_feed.py | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 Quorum/tests/checks/__init__.py rename Quorum/tests/{checks => }/test_checks.py (96%) rename Quorum/tests/{checks => }/test_price_feed.py (98%) diff --git a/Quorum/tests/checks/__init__.py b/Quorum/tests/checks/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/Quorum/tests/checks/test_checks.py b/Quorum/tests/test_checks.py similarity index 96% rename from Quorum/tests/checks/test_checks.py rename to Quorum/tests/test_checks.py index 55ac18c..3db3976 100644 --- a/Quorum/tests/checks/test_checks.py +++ b/Quorum/tests/test_checks.py @@ -36,7 +36,7 @@ def test_global_variables(source_codes: list[SourceCode], tmp_output_path: Path) @pytest.mark.parametrize('source_codes', ['ETH/0xAD6c03BF78A3Ee799b86De5aCE32Bb116eD24637'], indirect=True) -def test_price_feed(source_codes: list[SourceCode], tmp_output_path: Path): +def test_price_feed_check(source_codes: list[SourceCode], tmp_output_path: Path): price_feed_check = Checks.PriceFeedCheck('Aave', Chain.ETH, '', source_codes, [ ChainLinkAPI()]) price_feed_check.verify_price_feed() diff --git a/Quorum/tests/checks/test_price_feed.py b/Quorum/tests/test_price_feed.py similarity index 98% rename from Quorum/tests/checks/test_price_feed.py rename to Quorum/tests/test_price_feed.py index e6dc266..7f2fe70 100644 --- a/Quorum/tests/checks/test_price_feed.py +++ b/Quorum/tests/test_price_feed.py @@ -17,6 +17,7 @@ def test_price_feed(source_codes: list[SourceCode], tmp_output_path: Path): assert sorted([p.name for p in price_feed_check.check_folder.iterdir()]) == ['AaveV2Ethereum'] + def test_source_code_clean(): code = """ // SPDX-License-Identifier: MIT @@ -58,6 +59,7 @@ def test_source_code_clean(): import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; import {AaveV2Ethereum, AaveV2EthereumAssets, ILendingPoolConfigurator} from 'aave-address-book/AaveV2Ethereum.sol'; + contract AaveV2Ethereum_ReserveFactorUpdatesMidJuly_20240711 is IProposalGenericExecutor { ILendingPoolConfigurator public constant POOL_CONFIGURATOR = ILendingPoolConfigurator(AaveV2Ethereum.POOL_CONFIGURATOR); @@ -78,4 +80,5 @@ def test_source_code_clean(): POOL_CONFIGURATOR.setReserveFactor(AaveV2EthereumAssets.WETH_UNDERLYING, WETH_RF); } }""" + # Strip leading/trailing whitespace for accurate comparison assert cleaned.strip() == expected.strip()