Return urls related to dataset data.
Source code in tests/unit/apps/conftest.py
| @pytest.fixture
def data_urls():
"""Return urls related to dataset data."""
def f(dataset: Union[Dataset, UUID, str]):
dataset_id = dataset.id if isinstance(dataset, Dataset) else dataset
kwargs = {"dataset_id": dataset_id}
return {
"dataset": reverse("dataset-detail", kwargs={"pk": dataset_id}),
"files": reverse("dataset-files-list", kwargs=kwargs),
"directories": reverse("dataset-directories-list", kwargs=kwargs),
}
return f
|