datalad / datalad-ria

Adds functionality for RIA stores to DataLad
http://datalad.org
Other
0 stars 1 forks source link

Implement fixture for a populated test dataset #64

Closed mih closed 1 year ago

mih commented 1 year ago

In the old code base this was done with a populate_dataset helper from datalad.distributed.tests.ria_utils. This helper placed a fixed payload in a dataset that had to exist before:

example_payload = {
    'one.txt': 'content1',
    'subdir': {
        'two': 'content2',
    },
}

example_payload2 = {
    'three.txt': 'content3',
    'subdir': {
        'four': 'content4',
    },
}

datalad-next already provides the fixture existing_dataset, which could be used as a dependency for a dedicated fixture (function scope) that populates it with some standard content.