You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by lm...@apache.org on 2018/07/29 16:50:23 UTC
svn commit: r1836986 -
/chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py
Author: lmignon
Date: Sun Jul 29 16:50:23 2018
New Revision: 1836986
URL: http://svn.apache.org/viewvc?rev=1836986&view=rev
Log:
[FIX] DocumentTest: Fix testRelationship
Modified:
chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py
Modified: chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py?rev=1836986&r1=1836985&r2=1836986&view=diff
==============================================================================
--- chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py (original)
+++ chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py Sun Jul 29 16:50:23 2018
@@ -1149,7 +1149,7 @@ class DocumentTest(CmisTestBase):
exportFile1 = testFile1.replace('.', 'export.')
testFile2 = settings.TEST_BINARY_2
testFile2Size = os.path.getsize(testFile2)
- exportFile2 = testFile1.replace('.', 'export.')
+ exportFile2 = testFile2.replace('.', 'export.')
# create a test document
fileName = testFile1.split('/')[-1]
@@ -1332,7 +1332,11 @@ class DocumentTest(CmisTestBase):
if not testDoc.getAllowableActions().get('canCreateRelationship'):
print 'createRelationship not supported, skipping'
return
- relation = testDoc.createRelationship(testDoc2, 'R:cmis:relationship')
+ if not self._repo.getTypeDefinition('R:cm:replaces'):
+ print 'createRelationship not supported, skipping'
+ return
+
+ relation = testDoc.createRelationship(testDoc2, 'R:cm:replaces')
self.assertEqual(testDoc.getObjectId(), relation.source.getObjectId())
self.assertEqual(testDoc2.getObjectId(), relation.target.getObjectId())
relations = testDoc.getRelationships()