Beispiel #1
0
def hiw(tmpdir_factory):
    src = os.path.join(os.getcwd(), 'gridsync', 'resources', 'pixel.png')
    dst = str(tmpdir_factory.mktemp('test-magic-folder'))
    shutil.copy(src, dst)
    gateway = MagicMock()
    gateway.get_magic_folder_directory.return_value = dst
    return HistoryItemWidget(
        gateway, 'TestFolder', {
            'action': 'added',
            'member': 'admin',
            'mtime': 123456789,
            'path': 'pixel.png',
            'size': 0
        }, HistoryListWidget(gateway))
def hiw(tmpdir_factory):
    src = os.path.join(os.getcwd(), "gridsync", "resources", "pixel.png")
    dst = str(tmpdir_factory.mktemp("test-magic-folder"))
    shutil.copy(src, dst)
    gateway = MagicMock()
    gateway.get_magic_folder_directory.return_value = dst
    return HistoryItemWidget(
        gateway,
        "TestFolder",
        {
            "action": "added",
            "member": "admin",
            "mtime": 123456789,
            "path": "pixel.png",
            "size": 0,
        },
        HistoryListWidget(gateway),
    )
Beispiel #3
0
def hlw(tmpdir_factory):
    directory = str(tmpdir_factory.mktemp('test-magic-folder'))
    gateway = MagicMock()
    gateway.get_magic_folder_directory.return_value = directory
    return HistoryListWidget(gateway)