From 9a4ca14ea11d2bd6e1117c5d2ebddc89e9fd5c3c Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 6 Aug 2024 15:01:48 -0400 Subject: [PATCH] Mock function call that gets ursula version. --- tests/test_get_ursulas.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_get_ursulas.py b/tests/test_get_ursulas.py index bedaa34..c596a5d 100644 --- a/tests/test_get_ursulas.py +++ b/tests/test_get_ursulas.py @@ -195,12 +195,15 @@ def test_get_ursulas_schema(get_random_checksum_address): @pytest.mark.parametrize("timeout", [None, 15, 20]) @pytest.mark.parametrize("duration", [None, 0, 60 * 60 * 24, 60 * 60 * 24 * 365]) def test_get_ursulas_python_interface( + mocker, porter, ursulas, timeout, duration, excluded_staker_address_for_duration_greater_than_0, ): + mocker.patch.object(porter, "_get_ursula_version", return_value="7.4.0") + # simple quantity = 4 ursulas_info = porter.get_ursulas(quantity=quantity) @@ -286,12 +289,16 @@ def test_get_ursulas_python_interface( @pytest.mark.parametrize("timeout", [None, 10, 20]) @pytest.mark.parametrize("duration", [None, 0, 60 * 60 * 24, 60 * 60 * 24 * 365]) def test_get_ursulas_web_interface( + mocker, + porter, porter_web_controller, ursulas, timeout, duration, excluded_staker_address_for_duration_greater_than_0, ): + mocker.patch.object(porter, "_get_ursula_version", return_value="7.4.0") + # Send bad data to assert error return response = porter_web_controller.get( "/get_ursulas", data=json.dumps({"bad": "input"})