Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124820
D3611.id12709.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3611.id12709.diff
View Options
diff --git a/swh/scheduler/tests/test_cli.py b/swh/scheduler/tests/test_cli.py
--- a/swh/scheduler/tests/test_cli.py
+++ b/swh/scheduler/tests/test_cli.py
@@ -12,6 +12,7 @@
from click.testing import CliRunner
import pytest
+from swh.model.model import Origin
from swh.storage import get_storage
from swh.scheduler.cli import cli
from swh.scheduler.utils import create_task_dict
@@ -588,7 +589,7 @@
def _fill_storage_with_origins(storage, nb_origins):
- origins = [{"url": "http://example.com/{}".format(i),} for i in range(nb_origins)]
+ origins = [Origin(url=f"http://example.com/{i}") for i in range(nb_origins)]
storage.origin_add(origins)
return origins
@@ -597,11 +598,7 @@
def storage():
"""An instance of in-memory storage that gets injected
into the CLI functions."""
- storage_config = {
- "cls": "pipeline",
- "steps": [{"cls": "validate"}, {"cls": "memory"},],
- }
- storage = get_storage(**storage_config)
+ storage = get_storage(cls="memory")
with patch("swh.storage.get_storage") as get_storage_mock:
get_storage_mock.return_value = storage
yield storage
@@ -646,7 +643,7 @@
expected_origins
)
assert set.union(*(set(task["arguments"]["args"][0]) for task in tasks)) == {
- origin["url"] for origin in expected_origins
+ origin.url for origin in expected_origins
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 8:38 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218856
Attached To
D3611: test_cli: Adapt tests data and drop unsupported "validate" proxy
Event Timeline
Log In to Comment