chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r1551272 - in /chemistry/cmislib/trunk/src: cmislib.egg-info/SOURCES.txt cmislib/atompub_binding.py cmislib/browser_binding.py tests/cmislibtest.py
Date Mon, 16 Dec 2013 17:20:38 GMT
Author: jpotts
Date: Mon Dec 16 17:20:38 2013
New Revision: 1551272

URL: http://svn.apache.org/r1551272
Log:
Fix and unit test for CMIS-743 in which cmislib was failing to check out a doc after being
fetched by ID

Modified:
    chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
    chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
    chemistry/cmislib/trunk/src/cmislib/browser_binding.py
    chemistry/cmislib/trunk/src/tests/cmislibtest.py

Modified: chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt?rev=1551272&r1=1551271&r2=1551272&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt (original)
+++ chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt Mon Dec 16 17:20:38 2013
@@ -24,38 +24,6 @@ src/cmislib.egg-info/SOURCES.txt
 src/cmislib.egg-info/dependency_links.txt
 src/cmislib.egg-info/requires.txt
 src/cmislib.egg-info/top_level.txt
-src/doc/build/about.html
-src/doc/build/code.html
-src/doc/build/devguide.html
-src/doc/build/docs.html
-src/doc/build/examples.html
-src/doc/build/genindex.html
-src/doc/build/index.html
-src/doc/build/install.html
-src/doc/build/modindex.html
-src/doc/build/objects.inv
-src/doc/build/sample-data.html
-src/doc/build/search.html
-src/doc/build/searchindex.js
-src/doc/build/tests.html
-src/doc/build/_sources/about.txt
-src/doc/build/_sources/code.txt
-src/doc/build/_sources/devguide.txt
-src/doc/build/_sources/docs.txt
-src/doc/build/_sources/examples.txt
-src/doc/build/_sources/index.txt
-src/doc/build/_sources/install.txt
-src/doc/build/_sources/sample-data.txt
-src/doc/build/_sources/tests.txt
-src/doc/build/_static/basic.css
-src/doc/build/_static/default.css
-src/doc/build/_static/doctools.js
-src/doc/build/_static/file.png
-src/doc/build/_static/jquery.js
-src/doc/build/_static/minus.png
-src/doc/build/_static/plus.png
-src/doc/build/_static/pygments.css
-src/doc/build/_static/searchtools.js
 src/doc/src/Makefile
 src/doc/src/about.rst
 src/doc/src/code.rst

Modified: chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/atompub_binding.py?rev=1551272&r1=1551271&r2=1551272&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/atompub_binding.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/atompub_binding.py Mon Dec 16 17:20:38 2013
@@ -1487,7 +1487,7 @@ class AtomPubRepository(object):
          - includeAllowableActions
         """
 
-        return getSpecializedObject(AtomPubCmisObject(self._cmisClient, self, objectId, **kwargs),
**kwargs)
+        return getSpecializedObject(AtomPubCmisObject(self._cmisClient, self, CmisId(objectId),
**kwargs), **kwargs)
 
     def getObjectByPath(self, path, **kwargs):
 

Modified: chemistry/cmislib/trunk/src/cmislib/browser_binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/browser_binding.py?rev=1551272&r1=1551271&r2=1551272&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/browser_binding.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/browser_binding.py Mon Dec 16 17:20:38 2013
@@ -1027,7 +1027,7 @@ class BrowserRepository(object):
          - includeAllowableActions
         """
 
-        return getSpecializedObject(BrowserCmisObject(self._cmisClient, self, objectId, **kwargs),
**kwargs)
+        return getSpecializedObject(BrowserCmisObject(self._cmisClient, self, CmisId(objectId),
**kwargs), **kwargs)
 
     def query(self, statement, **kwargs):
 

Modified: chemistry/cmislib/trunk/src/tests/cmislibtest.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/tests/cmislibtest.py?rev=1551272&r1=1551271&r2=1551272&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/tests/cmislibtest.py (original)
+++ chemistry/cmislib/trunk/src/tests/cmislibtest.py Mon Dec 16 17:20:38 2013
@@ -821,6 +821,26 @@ class DocumentTest(CmisTestBase):
         finally:
             pwcDoc.delete()
 
+    #CMIS-743
+    def testCheckoutAfterFetchByID(self):
+        """Create a test doc, fetch it by ID, then check it out"""
+        props = {'cmis:objectTypeId': settings.VERSIONABLE_TYPE_ID}
+        newDoc = self._testFolder.createDocument('testDocument', properties=props)
+        if not newDoc.allowableActions['canCheckOut']:
+            print 'The test doc cannot be checked out...skipping'
+            return
+        newDocIdStr = str(newDoc.id)
+        newDoc = self._repo.getObject(newDocIdStr)
+        pwcDoc = newDoc.checkout()
+        try:
+            self.assertTrue(newDoc.isCheckedOut())
+            self.assert_('cmis:objectId' in newDoc.getProperties())
+            self.assert_('cmis:objectId' in pwcDoc.getProperties())
+            checkedOutDocs = self._repo.getCollection('checkedout')
+            self.assertTrue(isInResultSet(checkedOutDocs, pwcDoc))
+        finally:
+            pwcDoc.delete()
+
     def testCheckin(self):
         """Create a document in a test folder, check it out, then in"""
         testFilename = settings.TEST_BINARY_1.split('/')[-1]



Mime
View raw message