Skip to content
Snippets Groups Projects
Commit aeb6d7cd authored by Antoine Lambert's avatar Antoine Lambert
Browse files

tests: Fix flaky test introduced in e72b1e7a

Hypothesis can generate multiple times the same origin URL which
makes test fail due to the use of django cache in get_origin_visits.

So force the generation of a single hypothesis example for that test.
parent ca8e529f
No related branches found
No related tags found
1 merge request!722tests: Fix flaky test introduced in e72b1e7a9d18
......@@ -5,7 +5,7 @@
from datetime import timedelta
from hypothesis import given
from hypothesis import given, settings
import iso8601
import pytest
......@@ -17,6 +17,7 @@ from swh.web.common.typing import OriginInfo
from swh.web.tests.strategies import new_origin, new_snapshots
@settings(max_examples=1)
@given(new_origin(), new_snapshots(3))
def test_get_origin_visits(mocker, archive_data, new_origin, new_snapshots):
from swh.web.common import archive
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment