chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmig...@apache.org
Subject svn commit: r1836986 - /chemistry/cmislib/branches/py3_compat/src/tests/test_cmislib.py
Date Sun, 29 Jul 2018 16:50:23 GMT
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()



Mime
View raw message