Skip to content

Commit

Permalink
Merge branch 'hotfix/23.13.2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mfraezz committed Sep 26, 2023
2 parents 2dcc614 + 3671a85 commit 943dc72
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions api_tests/files/views/test_file_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,11 @@ def test_disambiguate_dataverse_paths_initial(self, app, user, node, dataverse):
)
data = res.json['data']
assert len(data) == 2
assert data[0]['attributes']['extra'] == {
'datasetVersion': 'latest',
'hashes': {
'md5': None,
'sha256': None
}
}
assert data[1]['attributes']['extra'] == {
'datasetVersion': 'latest-published',
'hashes': {
'md5': None,
'sha256': None
}
dataset_versions = {
_datum['attributes']['extra']['datasetVersion']
for _datum in data
}
assert dataset_versions == {'latest', 'latest-published'}

@responses.activate
def test_disambiguate_dataverse_paths_retrieve(self, app, user, node, dataverse, dataverse_draft_filenode, dataverse_published_filenode):
Expand All @@ -155,7 +146,6 @@ def test_disambiguate_dataverse_paths_retrieve(self, app, user, node, dataverse,
'path': '/testpath',
'materialized': '/testpath',
'kind': 'file',

'extra': {
'datasetVersion': 'latest',
},
Expand All @@ -179,20 +169,11 @@ def test_disambiguate_dataverse_paths_retrieve(self, app, user, node, dataverse,
)
data = res.json['data']
assert len(data) == 2
assert data[0]['attributes']['extra'] == {
'datasetVersion': 'latest',
'hashes': {
'md5': None,
'sha256': None
}
}
assert data[1]['attributes']['extra'] == {
'datasetVersion': 'latest-published',
'hashes': {
'md5': None,
'sha256': None
}
dataset_versions = {
_datum['attributes']['extra']['datasetVersion']
for _datum in data
}
assert dataset_versions == {'latest', 'latest-published'}


@pytest.mark.django_db
Expand Down

0 comments on commit 943dc72

Please sign in to comment.