chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r1208051 - in /chemistry/cmislib/trunk/src: cmislib/model.py tests/cmislibtest.py tests/settings.py
Date Tue, 29 Nov 2011 20:03:21 GMT
Author: jpotts
Date: Tue Nov 29 20:03:20 2011
New Revision: 1208051

URL: http://svn.apache.org/viewvc?rev=1208051&view=rev
Log:
Added check for None on changeToken. Fixed a bad reference to unqualified TEST_ROOT_PATH in
cmislibtest

Modified:
    chemistry/cmislib/trunk/src/cmislib/model.py
    chemistry/cmislib/trunk/src/tests/cmislibtest.py
    chemistry/cmislib/trunk/src/tests/settings.py

Modified: chemistry/cmislib/trunk/src/cmislib/model.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/model.py?rev=1208051&r1=1208050&r2=1208051&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/model.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/model.py Tue Nov 29 20:03:20 2011
@@ -1917,7 +1917,8 @@ class CmisObject(object):
 
         # if we have a change token, we must pass it back, per the spec
         args = {}        
-        if self.properties.has_key('cmis:changeToken'):
+        if (self.properties.has_key('cmis:changeToken') and
+            self.properties['cmis:changeToken'] != None):
             args = {"changeToken": self.properties['cmis:changeToken']}
 
         # build the entry based on the properties provided
@@ -2518,7 +2519,8 @@ class Document(CmisObject):
 
         # if we have a change token, we must pass it back, per the spec
         args = {}        
-        if self.properties.has_key('cmis:changeToken'):
+        if (self.properties.has_key('cmis:changeToken') and
+            self.properties['cmis:changeToken'] != None):
             args = {"changeToken": self.properties['cmis:changeToken']}
 
         # put the content file
@@ -2557,7 +2559,8 @@ class Document(CmisObject):
 
         # if we have a change token, we must pass it back, per the spec
         args = {}        
-        if self.properties.has_key('cmis:changeToken'):
+        if (self.properties.has_key('cmis:changeToken') and
+            self.properties['cmis:changeToken'] != None):
             args = {"changeToken": self.properties['cmis:changeToken']}
 
         # delete the content stream

Modified: chemistry/cmislib/trunk/src/tests/cmislibtest.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/tests/cmislibtest.py?rev=1208051&r1=1208050&r2=1208051&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/tests/cmislibtest.py (original)
+++ chemistry/cmislib/trunk/src/tests/cmislibtest.py Tue Nov 29 20:03:20 2011
@@ -39,7 +39,7 @@ my_dir = os.path.dirname(os.path.abspath
 try:
     os.stat(settings.TEST_BINARY_1)
 except:
-    settings.TEST_BINARY_1 = os.path.join(my_dir, settings.TEST_BINARY_1)
+    settings.TEST_BINARY_1 = os.path.join(my_dir, TEST_BINARY_1)
 try:
     os.stat(settings.TEST_BINARY_2)
 except:
@@ -54,7 +54,7 @@ class CmisTestBase(unittest.TestCase):
         """ Create a root test folder for the test. """
         self._cmisClient = CmisClient(settings.REPOSITORY_URL, settings.USERNAME, settings.PASSWORD,
**settings.EXT_ARGS)
         self._repo = self._cmisClient.getDefaultRepository()
-        self._rootFolder = self._repo.getObjectByPath(TEST_ROOT_PATH)
+        self._rootFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH)
         self._folderName = " ".join(['cmislib', self.__class__.__name__, str(time())])
         self._testFolder = self._rootFolder.createFolder(self._folderName)
 

Modified: chemistry/cmislib/trunk/src/tests/settings.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/tests/settings.py?rev=1208051&r1=1208050&r2=1208051&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/tests/settings.py (original)
+++ chemistry/cmislib/trunk/src/tests/settings.py Tue Nov 29 20:03:20 2011
@@ -22,10 +22,10 @@
 #
 # CMIS repository's service URL
 #REPOSITORY_URL = 'http://cmis.alfresco.com/s/cmis'
-REPOSITORY_URL = 'http://localhost:8081/chemistry/atom' # Apache Chemistry
+#REPOSITORY_URL = 'http://localhost:8081/chemistry/atom' # Apache Chemistry
 #REPOSITORY_URL = 'http://cmis.dnsdojo.com:8080/p8cmis/resources/DaphneA/Service'
 #REPOSITORY_URL = 'http://cmis.dnsdojo.com:8080/p8cmis/'
-#REPOSITORY_URL = 'http://localhost:8080/alfresco/cmisatom'  # Alfresco >= 4.0
+REPOSITORY_URL = 'http://localhost:8080/alfresco/cmisatom'  # Alfresco 4.0
 #REPOSITORY_URL = 'http://localhost:8080/alfresco/s/api/cmis'  # Alfresco
 #REPOSITORY_URL = 'http://cmis.demo.nuxeo.org/nuxeo/atom/cmis' # Nuxeo demo
 #REPOSITORY_URL = 'http://localhost:8080/nuxeo/atom/cmis' # Nuxeo local



Mime
View raw message