cmis: change functionnal tests for apache-chemistry server compliance
This commit is contained in:
parent
5f792313c1
commit
5c4842e9a1
|
@ -34,3 +34,7 @@ Then you would start the test suite with the following command:
|
|||
$ py.test --cmis-connector-url=http://127.0.0.1:8000/cmis/local-alfresco/ \
|
||||
--cmis-endpoint=http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom \
|
||||
--cmis-username=admin --cmis-password=admin tests_cmis.py
|
||||
|
||||
Additional options :
|
||||
|
||||
* --preserve-tree : do not delete the CMIS folder used for the tests
|
||||
|
|
|
@ -9,6 +9,8 @@ def pytest_addoption(parser):
|
|||
parser.addoption("--cmis-endpoint", help="Url of a passerelle CMIS endpoint")
|
||||
parser.addoption("--cmis-username", help="Username for the CMIS endpoint")
|
||||
parser.addoption("--cmis-password", help="Password for the CMIS endpoint")
|
||||
parser.addoption(
|
||||
"--preserve-tree", action="store_true", default=False, help="Preserve test directory")
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
|
@ -24,8 +26,10 @@ def cmis_connector(request):
|
|||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def cmis_tmpdir(cmisclient):
|
||||
def cmis_tmpdir(cmisclient, request):
|
||||
path = 'test-%s' % random.randint(0, 10000)
|
||||
folder = cmisclient.defaultRepository.rootFolder.createFolder(path)
|
||||
yield folder.properties['cmis:path']
|
||||
folder.deleteTree()
|
||||
preserve_tree = request.config.getoption("--preserve-tree")
|
||||
if not preserve_tree:
|
||||
folder.deleteTree()
|
||||
|
|
|
@ -7,7 +7,7 @@ import pytest
|
|||
import requests
|
||||
|
||||
|
||||
SPECIAL_CHARS = '!#$%&+-^_`~;[]{}+=~'
|
||||
SPECIAL_CHARS = '!#$%&+-^_`;[]{}+='
|
||||
|
||||
|
||||
@pytest.mark.parametrize("path,file_name", [
|
||||
|
|
Loading…
Reference in New Issue