Skip to content

Commit

Permalink
Mock function call that gets ursula version.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre authored and vzotova committed Aug 6, 2024
1 parent 5a0c1b4 commit 9a4ca14
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_get_ursulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"})
Expand Down

0 comments on commit 9a4ca14

Please sign in to comment.