Exemplo n.º 1
0
sys.path.append("/usr/lib/archivematica/archivematicaCommon")
from dicts import ReplacementDict, ChoicesDict

from main import models

TRANSFER = models.Transfer(
    uuid='fb0aa04d-8547-46fc-bb7f-288ea5827d2c',
    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
Exemplo n.º 2
0
from dicts import ReplacementDict, ChoicesDict
from dicts import setup as setup_dicts

from main import models

TRANSFER = models.Transfer(
    uuid="fb0aa04d-8547-46fc-bb7f-288ea5827d2c",
    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(