Unverified Commit b9e8b5e8 authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #14133 from mvdbeek/fix_api_test_test_collection_contents_empty_root

[22.05] Fix test_collection_contents_empty_root, use fetch data response
parents 78a393fd 590adfea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -432,7 +432,10 @@ class DatasetCollectionApiTestCase(ApiTestCase):
        assert offset_contents[0]["element_index"] == 1

    def test_collection_contents_empty_root(self):
        hdca = self.dataset_collection_populator.create_list_in_history(self.history_id, contents=[]).json()
        create_response = self.dataset_collection_populator.create_list_in_history(
            self.history_id, contents=[], wait=True
        ).json()
        hdca = create_response["output_collections"][0]
        assert hdca["elements"] == []
        root_contents_url = hdca["contents_url"]
        response = self._get(root_contents_url)