Exemplo n.º 1
0
    currentlocation='%sharedDirectory%foo',
    type='Standard',
    accessionid='accession1',
    hidden=True
)

SIP = models.SIP(
    uuid='c58794fd-4fb8-42a0-b9be-e75191696ab8',
    currentpath='%sharedDirectory%bar',
    hidden=True
)

FILE = models.File(
    uuid='ee61d09b-2790-4980-827a-135346657eec',
    transfer=TRANSFER,
    originallocation='%sharedDirectory%orig',
    currentlocation='%sharedDirectory%new',
    filegrpuse='original'
)


def test_alternate_replacementdict_constructor():
    """
    This constructor allows serialized Python strings to be expanded
    into ReplacementDict instances.
    """

    d = {"foo": "bar"}
    assert ReplacementDict(d) == ReplacementDict.fromstring(str(d))

Exemplo n.º 2
0
    currentlocation="%sharedDirectory%foo",
    type="Standard",
    accessionid="accession1",
    hidden=True,
)

SIP = models.SIP(
    uuid="c58794fd-4fb8-42a0-b9be-e75191696ab8",
    currentpath="%sharedDirectory%bar",
    hidden=True,
)

FILE = models.File(
    uuid="ee61d09b-2790-4980-827a-135346657eec",
    transfer=TRANSFER,
    originallocation="%sharedDirectory%orig",
    currentlocation="%sharedDirectory%new",
    filegrpuse="original",
)


@pytest.fixture(scope="module", autouse=True)
def with_dicts():
    setup_dicts(
        shared_directory="/shared/",
        processing_directory="/processing/",
        watch_directory="/watch/",
        rejected_directory="/rejected/",
    )