chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r1032620 - /incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py
Date Mon, 08 Nov 2010 16:16:38 GMT
Author: fguillaume
Date: Mon Nov  8 16:16:37 2010
New Revision: 1032620

URL: http://svn.apache.org/viewvc?rev=1032620&view=rev
Log:
Fix test suite to not confuse name and path segment

Modified:
    incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py

Modified: incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py?rev=1032620&r1=1032619&r2=1032620&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py (original)
+++ incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py Mon Nov  8 16:16:37 2010
@@ -486,6 +486,7 @@ class FolderTest(CmisTestBase):
         # create the folder structure
         parentFolder = self._testFolder.createFolder(parentFolderName)
         subFolder = parentFolder.createFolder(subFolderName)
+        subFolderPath = subFolder.getProperties().get("cmis:path")
 
         # Per CMIS-170, CMIS providers are not required to filter the
         # properties returned. So these tests will check only for the presence
@@ -493,8 +494,7 @@ class FolderTest(CmisTestBase):
         # should be filtered if the server chooses to do so.
 
         # test when used with getObjectByPath
-        searchFolder = self._repo.getObjectByPath( \
-                        "/".join([TEST_ROOT_PATH, testFolderName, parentFolderName, subFolderName]),
\
+        searchFolder = self._repo.getObjectByPath(subFolderPath, \
                         filter='cmis:objectId,cmis:objectTypeId,cmis:baseTypeId')
         self.assertEquals(subFolder.getObjectId(), searchFolder.getObjectId())
         self.assertTrue(searchFolder.getProperties().has_key('cmis:objectId'))
@@ -502,8 +502,7 @@ class FolderTest(CmisTestBase):
         self.assertTrue(searchFolder.getProperties().has_key('cmis:baseTypeId'))
 
         # test when used with getObjectByPath + reload
-        searchFolder = self._repo.getObjectByPath( \
-                        "/".join([TEST_ROOT_PATH, testFolderName, parentFolderName, subFolderName]),
\
+        searchFolder = self._repo.getObjectByPath(subFolderPath, \
                         filter='cmis:objectId,cmis:objectTypeId,cmis:baseTypeId')
         searchFolder.reload()
         self.assertEquals(subFolder.getObjectId(), searchFolder.getObjectId())



Mime
View raw message