示例#1
0
def test_document_trash(server):
    doc = Document(name=WORKSPACE_NAME,
                   type="File",
                   properties={"dc:title": "bar.txt"})
    doc = server.documents.create(doc, parent_path=WORKSPACE_ROOT)
    try:
        assert not doc.isTrashed
        doc.trash()
        assert doc.isTrashed
        doc.untrash()
        assert not doc.isTrashed
    finally:
        doc.delete()
def test_document_trash(server):
    doc = Document(name=pytest.ws_python_test_name,
                   type='File',
                   properties={
                       'dc:title': 'bar.txt',
                   })
    doc = server.documents.create(doc, parent_path=pytest.ws_root_path)
    try:
        assert not doc.isTrashed
        doc.trash()
        assert doc.isTrashed
        doc.untrash()
        assert not doc.isTrashed
    finally:
        doc.delete()
def test_document_trash(server):
    doc = Document(
        name=pytest.ws_python_test_name,
        type='File',
        properties={
            'dc:title': 'bar.txt',
        })
    doc = server.documents.create(
        doc, parent_path=pytest.ws_root_path)
    try:
        assert not doc.isTrashed
        doc.trash()
        assert doc.isTrashed
        doc.untrash()
        assert not doc.isTrashed
    finally:
        doc.delete()