chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r963897 - in /incubator/chemistry/cmislib/trunk: ./ .project .pydevproject PKG-INFO setup.cfg setup.py src/cmislib.egg-info/PKG-INFO src/cmislib.egg-info/SOURCES.txt src/cmislib/model.py src/doc/ src/tests/cmislibtest.py src/tests/settings.py
Date Tue, 13 Jul 2010 22:52:24 GMT
Author: jpotts
Date: Tue Jul 13 22:52:23 2010
New Revision: 963897

URL: http://svn.apache.org/viewvc?rev=963897&view=rev
Log:
Fixes for CMIS-229 (test path expects trailing slash), CMIS-231 (setContentStream sets mimetype
incorrectly), CMIS-233 (certain tests should check PWCUpdatable capability), CMIS-234 (remove
testSimpleSelect from default test suite), CMIS-235 (ACLTest.testApplyACL uses hardcoded principal),
CMIS-237 (includeRelationships should default to 'none'). 

Added:
    incubator/chemistry/cmislib/trunk/.project
Removed:
    incubator/chemistry/cmislib/trunk/PKG-INFO
Modified:
    incubator/chemistry/cmislib/trunk/   (props changed)
    incubator/chemistry/cmislib/trunk/.pydevproject
    incubator/chemistry/cmislib/trunk/setup.cfg
    incubator/chemistry/cmislib/trunk/setup.py
    incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO
    incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
    incubator/chemistry/cmislib/trunk/src/cmislib/model.py
    incubator/chemistry/cmislib/trunk/src/doc/   (props changed)
    incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py
    incubator/chemistry/cmislib/trunk/src/tests/settings.py

Propchange: incubator/chemistry/cmislib/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 13 22:52:23 2010
@@ -0,0 +1,2 @@
+build
+dist

Added: incubator/chemistry/cmislib/trunk/.project
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/.project?rev=963897&view=auto
==============================================================================
--- incubator/chemistry/cmislib/trunk/.project (added)
+++ incubator/chemistry/cmislib/trunk/.project Tue Jul 13 22:52:23 2010
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>cmislib</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>

Modified: incubator/chemistry/cmislib/trunk/.pydevproject
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/.pydevproject?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/.pydevproject (original)
+++ incubator/chemistry/cmislib/trunk/.pydevproject Tue Jul 13 22:52:23 2010
@@ -6,5 +6,5 @@
 <path>/cmislib/src</path>
 </pydev_pathproperty>
 <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
 </pydev_project>

Modified: incubator/chemistry/cmislib/trunk/setup.cfg
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/setup.cfg?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/setup.cfg (original)
+++ incubator/chemistry/cmislib/trunk/setup.cfg Tue Jul 13 22:52:23 2010
@@ -1,2 +1,2 @@
 [egg_info]
-tag_build =
\ No newline at end of file
+tag_build = dev
\ No newline at end of file

Modified: incubator/chemistry/cmislib/trunk/setup.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/setup.py?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/setup.py (original)
+++ incubator/chemistry/cmislib/trunk/setup.py Tue Jul 13 22:52:23 2010
@@ -1,6 +1,10 @@
+import os
 from setuptools import setup, find_packages
 
-version = '0.3'
+version = '0.4'
+
+def read(fname):
+    return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(
     name = "cmislib",
@@ -13,4 +17,12 @@ setup(
     package_dir = {'':'src'},
     packages = find_packages("src"),
     include_package_data = True,
+    long_description = read('README.txt'),
+    classifiers = [
+        "Development Status :: 4 - Beta",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: Apache Software License",
+        "Operating System :: OS Independent",
+        "Topic :: Software Development :: Libraries",
+        ],
 )

Modified: incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO Tue Jul 13 22:52:23 2010
@@ -1,10 +1,42 @@
 Metadata-Version: 1.0
 Name: cmislib
-Version: 0.3
+Version: 0.4dev
 Summary: CMIS client library for Python
 Home-page: http://code.google.com/p/cmislib/
 Author: Jeff Potts
 Author-email: jeffpotts01@gmail.com
 License: Apache
-Description: UNKNOWN
+Description: ABOUT
+        
+        Thanks for using cmislib, the CMIS client library for Python.
+        
+        The goal of this library is to provide an interoperable API to CMIS
+        repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
+        EMC Documentum, and any other content repository that is CMIS-compliant.
+        
+        More info on CMIS can be found at:
+        http://www.oasis-open.org/committees/cmis
+        
+        SOURCE
+        
+        The source code for this project lives at http://code.google.com/p/cmislib.
+        
+        TESTS
+        
+        There are unit tests available in the tests directory. They require access
+        to a CMIS provider. There are many freely-available CMIS repositories
+        available to run locally or that are hosted.
+        
+        DOC
+        
+        Documentation that tells you what this is all about can be found in the doc
+        directory. Please see the doc for dependencies, required CMIS version level,
+        required Python version, etc.
+        
+        
 Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: Apache Software License
+Classifier: Operating System :: OS Independent
+Classifier: Topic :: Software Development :: Libraries

Modified: incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt Tue Jul 13 22:52:23
2010
@@ -2,6 +2,7 @@
 .pydevproject
 LICENSE.txt
 MANIFEST.in
+PKG-INFO
 README.txt
 setup.cfg
 setup.py
@@ -14,7 +15,6 @@ src/cmislib.egg-info/PKG-INFO
 src/cmislib.egg-info/SOURCES.txt
 src/cmislib.egg-info/dependency_links.txt
 src/cmislib.egg-info/top_level.txt
-src/data/acl.alfresco.xml
 src/data/checkedout.alfresco.xml
 src/data/checkedout.filenet.xml
 src/data/checkedout2.filenet.xml
@@ -22,7 +22,6 @@ src/data/children.xml
 src/data/document.nuxeo.xml
 src/data/document.xml
 src/data/folder.xml
-src/data/repositoryInfo.alfresco.xml
 src/data/repositoryInfo.chemistry.xml
 src/data/repositoryInfo.filenet.xml
 src/data/repositoryInfo.nuxeo.xml
@@ -93,5 +92,4 @@ src/tests/250px-Cmis_logo.png
 src/tests/__init__.py
 src/tests/cmislibtest.py
 src/tests/sample-a.pdf
-src/tests/settings.py
-src/tests/tester.py
\ No newline at end of file
+src/tests/settings.py
\ No newline at end of file

Modified: incubator/chemistry/cmislib/trunk/src/cmislib/model.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib/model.py?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib/model.py (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib/model.py Tue Jul 13 22:52:23 2010
@@ -918,12 +918,12 @@ class Repository(object):
               '{filter}': '',
               '{includeAllowableActions}': 'false',
               '{includePolicyIds}': 'false',
-              '{includeRelationships}': 'false',
+              '{includeRelationships}': '',
               '{includeACL}': 'false',
               '{renditionFilter}': ''}
 
         options = {}
-        addOptions = {} # args specified, but not in the template
+        addOptions = {}  # args specified, but not in the template
         for k, v in kwargs.items():
             pKey = "{" + k + "}"
             if template.find(pKey) >= 0:
@@ -1614,12 +1614,12 @@ class CmisObject(object):
               '{filter}': '',
               '{includeAllowableActions}': 'false',
               '{includePolicyIds}': 'false',
-              '{includeRelationships}': 'false',
+              '{includeRelationships}': '',
               '{includeACL}': 'false',
               '{renditionFilter}': ''}
 
         options = {}
-        addOptions = {} # args specified, but not in the template
+        addOptions = {}  # args specified, but not in the template
         for k, v in self._kwargs.items():
             pKey = "{" + k + "}"
             if template.find(pKey) >= 0:
@@ -2495,7 +2495,7 @@ class Document(CmisObject):
             if contentElements[0].childNodes:
                 return contentElements[0].childNodes[0].data
 
-    def setContentStream(self, contentFile):
+    def setContentStream(self, contentFile, contentType=None):
 
         """
         See CMIS specification document 2.2.4.16 setContentStream
@@ -2518,11 +2518,16 @@ class Document(CmisObject):
         # set the content stream when that is the case
         assert(srcUrl), 'Unable to determine content stream URL.'
 
-        # build the Atom entry
-        #xmlDoc = self._getEntryXmlDoc(contentFile=contentFile)
+        # need to determine the mime type
+        mimetype = contentType
+        if not mimetype and hasattr(contentFile, 'name'):
+            mimetype, encoding = mimetypes.guess_type(contentFile.name)
 
-        # post the Atom entry
-        result = self._cmisClient.put(srcUrl, contentFile.read(), ATOM_XML_TYPE)
+        if not mimetype:
+            mimetype = 'application/binary'
+
+        # put the content file
+        result = self._cmisClient.put(srcUrl, contentFile.read(), mimetype)
         if type(result) == HTTPError:
             raise CmisException(result.code)
 

Propchange: incubator/chemistry/cmislib/trunk/src/doc/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 13 22:52:23 2010
@@ -0,0 +1 @@
+build

Modified: incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py (original)
+++ incubator/chemistry/cmislib/trunk/src/tests/cmislibtest.py Tue Jul 13 22:52:23 2010
@@ -18,6 +18,7 @@
 Unit tests for cmislib
 '''
 import unittest
+from unittest import TestSuite, TestLoader
 from cmislib.model import CmisClient, ACE
 from cmislib.exceptions import \
                           ObjectNotFoundException, \
@@ -28,6 +29,11 @@ import os
 from time import sleep, time
 import settings
 
+if (settings.TEST_ROOT_PATH == "/"):
+    TEST_ROOT_PATH = ""
+else:
+    TEST_ROOT_PATH = settings.TEST_ROOT_PATH
+
 
 class CmisTestBase(unittest.TestCase):
 
@@ -37,7 +43,7 @@ class CmisTestBase(unittest.TestCase):
         """ Create a root test folder for the test. """
         self._cmisClient = CmisClient(settings.REPOSITORY_URL, settings.USERNAME, settings.PASSWORD)
         self._repo = self._cmisClient.getDefaultRepository()
-        self._rootFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH)
+        self._rootFolder = self._repo.getObjectByPath(TEST_ROOT_PATH)
         self._folderName = " ".join(['cmislib', self.__class__.__name__, str(time())])
         self._testFolder = self._rootFolder.createFolder(self._folderName)
 
@@ -259,12 +265,12 @@ class RepositoryTest(CmisTestBase):
         doc10 = self._testFolder.createDocument(settings.TEST_BINARY_1, contentFile=f)
         doc10Id = doc10.getObjectId()
         pwc = doc10.checkout()
-        doc11 = pwc.checkin(major='false') # checkin a minor version, 1.1
+        doc11 = pwc.checkin(major='false')  # checkin a minor version, 1.1
         pwc = doc11.checkout()
-        doc20 = pwc.checkin() # checkin a major version, 2.0
+        doc20 = pwc.checkin()  # checkin a major version, 2.0
         doc20Id = doc20.getObjectId()
         pwc = doc20.checkout()
-        doc21 = pwc.checkin(major='false') # checkin a minor version, 2.1
+        doc21 = pwc.checkin(major='false')  # checkin a minor version, 2.1
         doc21Id = doc21.getObjectId()
 
         docLatest = self._repo.getObject(doc10Id, returnVersion='latest')
@@ -295,16 +301,16 @@ class RepositoryTest(CmisTestBase):
         # create the folder structure
         parentFolder = self._testFolder.createFolder(parentFolderName)
         subFolder = parentFolder.createFolder(subFolderName)
-        searchFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH + "/".join([testFolderName,
parentFolderName, subFolderName]))
+        searchFolder = self._repo.getObjectByPath("/".join([TEST_ROOT_PATH, testFolderName,
parentFolderName, subFolderName]))
         self.assertEquals(subFolder.getObjectId(), searchFolder.getObjectId())
 
         # create a test doc
         doc = subFolder.createDocument(docName)
-        searchDoc = self._repo.getObjectByPath(settings.TEST_ROOT_PATH + "/".join([testFolderName,
parentFolderName, subFolderName, docName]))
+        searchDoc = self._repo.getObjectByPath("/".join([TEST_ROOT_PATH, testFolderName,
parentFolderName, subFolderName, docName]))
         self.assertEquals(doc.getObjectId(), searchDoc.getObjectId())
 
         # get the subfolder by path, then ask for its children
-        subFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH + "/".join([testFolderName,
parentFolderName, subFolderName]))
+        subFolder = self._repo.getObjectByPath("/".join([TEST_ROOT_PATH, testFolderName,
parentFolderName, subFolderName]))
         self.assertEquals(len(subFolder.getChildren().getResults()), 1)
 
     def testGetUnfiledDocs(self):
@@ -394,7 +400,7 @@ class FolderTest(CmisTestBase):
         self.assertTrue(isInResultSet(resultSet, grandChild))
 
         # test getting descendants with depth=-1
-        resultSet = self._testFolder.getDescendants() #-1 is the default depth
+        resultSet = self._testFolder.getDescendants()  # -1 is the default depth
         self.assert_(resultSet != None)
         self.assertEquals(3, len(resultSet.getResults()))
         self.assertTrue(isInResultSet(resultSet, childFolder1))
@@ -483,8 +489,8 @@ class FolderTest(CmisTestBase):
         # should be filtered if the server chooses to do so.
 
         # test when used with getObjectByPath
-        searchFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH + \
-                        "/".join([testFolderName, parentFolderName, subFolderName]), \
+        searchFolder = self._repo.getObjectByPath( \
+                        "/".join([TEST_ROOT_PATH, testFolderName, parentFolderName, subFolderName]),
\
                         filter='cmis:objectId,cmis:objectTypeId,cmis:baseTypeId')
         self.assertEquals(subFolder.getObjectId(), searchFolder.getObjectId())
         self.assertTrue(searchFolder.getProperties().has_key('cmis:objectId'))
@@ -492,8 +498,8 @@ class FolderTest(CmisTestBase):
         self.assertTrue(searchFolder.getProperties().has_key('cmis:baseTypeId'))
 
         # test when used with getObjectByPath + reload
-        searchFolder = self._repo.getObjectByPath(settings.TEST_ROOT_PATH + \
-                        "/".join([testFolderName, parentFolderName, subFolderName]), \
+        searchFolder = self._repo.getObjectByPath( \
+                        "/".join([TEST_ROOT_PATH, testFolderName, parentFolderName, subFolderName]),
\
                         filter='cmis:objectId,cmis:objectTypeId,cmis:baseTypeId')
         searchFolder.reload()
         self.assertEquals(subFolder.getObjectId(), searchFolder.getObjectId())
@@ -721,6 +727,10 @@ class DocumentTest(CmisTestBase):
 
     def testCheckinAfterGetPWC(self):
         '''Create a document in a test folder, check it out, call getPWC, then checkin'''
+        if not self._repo.getCapabilities()['PWCUpdatable'] == True:
+            print 'Repository does not support PWCUpdatable, skipping'
+            return
+
         testFilename = settings.TEST_BINARY_1
         contentFile = open(testFilename, 'rb')
         testDoc = self._testFolder.createDocument(testFilename, contentFile=contentFile)
@@ -771,12 +781,12 @@ class DocumentTest(CmisTestBase):
         f = open(settings.TEST_BINARY_1, 'rb')
         doc10 = self._testFolder.createDocument(settings.TEST_BINARY_1, contentFile=f)
         pwc = doc10.checkout()
-        doc11 = pwc.checkin(major='false') # checkin a minor version, 1.1
+        doc11 = pwc.checkin(major='false')  # checkin a minor version, 1.1
         pwc = doc11.checkout()
-        doc20 = pwc.checkin() # checkin a major version, 2.0
+        doc20 = pwc.checkin()  # checkin a major version, 2.0
         doc20Id = doc20.getObjectId()
         pwc = doc20.checkout()
-        doc21 = pwc.checkin(major='false') # checkin a minor version, 2.1
+        doc21 = pwc.checkin(major='false')  # checkin a minor version, 2.1
         doc21Id = doc21.getObjectId()
 
         docLatest = doc10.getLatestVersion()
@@ -790,12 +800,12 @@ class DocumentTest(CmisTestBase):
         f = open(settings.TEST_BINARY_1, 'rb')
         doc10 = self._testFolder.createDocument(settings.TEST_BINARY_1, contentFile=f)
         pwc = doc10.checkout()
-        doc11 = pwc.checkin(major='false') # checkin a minor version, 1.1
+        doc11 = pwc.checkin(major='false')  # checkin a minor version, 1.1
         pwc = doc11.checkout()
-        doc20 = pwc.checkin() # checkin a major version, 2.0
+        doc20 = pwc.checkin()  # checkin a major version, 2.0
         doc20Label = doc20.getProperties()['cmis:versionLabel']
         pwc = doc20.checkout()
-        doc21 = pwc.checkin(major='false') # checkin a minor version, 2.1
+        doc21 = pwc.checkin(major='false')  # checkin a minor version, 2.1
         doc21Label = doc21.getProperties()['cmis:versionLabel']
 
         propsLatest = doc10.getPropertiesOfLatestVersion()
@@ -877,6 +887,36 @@ class DocumentTest(CmisTestBase):
         self.assertEquals(testFile2Size, os.path.getsize(exportFile2))
         os.remove(exportFile2)
 
+    def testSetContentStreamPWCMimeType(self):
+        '''Check the mimetype after the PWC checkin'''
+        if self._repo.getCapabilities()['ContentStreamUpdatability'] == 'none':
+            print 'This repository does not allow content stream updates, skipping'
+            return
+
+        testFile1 = settings.TEST_BINARY_1
+
+        # create a test document
+        contentFile = open(testFile1, 'rb')
+        newDoc = self._testFolder.createDocument(testFile1, contentFile=contentFile)
+        origMimeType = newDoc.properties['cmis:contentStreamMimeType']
+        contentFile.close()
+
+        # checkout the file
+        pwc = newDoc.checkout()
+
+        # update the PWC with a new file
+        f = open(testFile1, 'rb')
+        pwc.setContentStream(f)
+        f.close()
+
+        # checkin the PWC
+        newDoc = pwc.checkin()
+
+        # CMIS-231 the checked in doc should have the same mime type as
+        # the original document
+        self.assertEquals(origMimeType, \
+                          newDoc.properties['cmis:contentStreamMimeType'])
+
     def testSetContentStreamDoc(self):
         '''Set the content stream on a doc that's not checked out'''
         if self._repo.getCapabilities()['ContentStreamUpdatability'] != 'anytime':
@@ -928,6 +968,9 @@ class DocumentTest(CmisTestBase):
         if self._repo.getCapabilities()['ContentStreamUpdatability'] == 'none':
             print 'This repository does not allow content stream updates, skipping'
             return
+        if not self._repo.getCapabilities()['PWCUpdatable'] == True:
+            print 'Repository does not support PWCUpdatable, skipping'
+            return
 
         # create a test document
         contentFile = open(settings.TEST_BINARY_1, 'rb')
@@ -993,9 +1036,9 @@ class DocumentTest(CmisTestBase):
         '''Get all versions of an object'''
         testDoc = self._testFolder.createDocument('testdoc')
         pwc = testDoc.checkout()
-        doc = pwc.checkin() # 2.0
+        doc = pwc.checkin()  # 2.0
         pwc = doc.checkout()
-        doc = pwc.checkin() # 3.0
+        doc = pwc.checkin()  # 3.0
         self.assertEquals('3.0', doc.getProperties()['cmis:versionLabel'])
         rs = doc.getAllVersions()
         self.assertEquals(3, len(rs.getResults()))
@@ -1128,12 +1171,12 @@ class ACLTest(CmisTestBase):
             print 'Repository needs to support either both or basic permissions for this
test'
             return
         acl = self._testFolder.getACL()
-        acl.addEntry(ACE('jpotts', 'cmis:write', 'true'))
+        acl.addEntry(ACE(settings.TEST_PRINCIPAL_ID, 'cmis:write', 'true'))
         acl = self._testFolder.applyACL(acl)
         # would be good to check that the permission we get back is what we set
         # but at least one server (Alf) appears to map the basic perm to a
         # repository-specific perm
-        self.assertTrue(acl.getEntries().has_key('jpotts'))
+        self.assertTrue(acl.getEntries().has_key(settings.TEST_PRINCIPAL_ID))
 
 
 def isInCollection(collection, targetDoc):
@@ -1170,4 +1213,24 @@ def isInResultSet(resultSet, targetDoc):
             done = True
 
 if __name__ == "__main__":
-    unittest.main()
+    #unittest.main()
+    tts = TestSuite()
+    tts.addTests(TestLoader().loadTestsFromTestCase(CmisClientTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(RepositoryTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(FolderTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(DocumentTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(TypeTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(ACLTest))
+    tts.addTests(TestLoader().loadTestsFromTestCase(ChangeEntryTest))
+
+    # WARNING: Potentially long-running tests
+
+    # Query tests
+    #tts.addTests(TestLoader().loadTestsFromTestCase(QueryTest))
+    #tts.addTest(QueryTest('testPropertyMatch'))
+    #tts.addTest(QueryTest('testFullText'))
+    #tts.addTest(QueryTest('testScore'))
+    #tts.addTest(QueryTest('testWildcardPropertyMatch'))
+    #tts.addTest(QueryTest('testSimpleSelect'))
+
+    unittest.TextTestRunner().run(tts)

Modified: incubator/chemistry/cmislib/trunk/src/tests/settings.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/tests/settings.py?rev=963897&r1=963896&r2=963897&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/tests/settings.py (original)
+++ incubator/chemistry/cmislib/trunk/src/tests/settings.py Tue Jul 13 22:52:23 2010
@@ -4,28 +4,34 @@
 # CMIS repository's service URL
 #REPOSITORY_URL = 'http://cmis.alfresco.com/s/cmis'
 #REPOSITORY_URL = 'http://localhost:8080/cmis/repository' # Apache Chemistry
-REPOSITORY_URL = 'http://cmis.dnsdojo.com:8080/p8cmis/resources/DaphneA/Service'
-#REPOSITORY_URL = 'http://localhost:8080/alfresco/s/cmis'
+#REPOSITORY_URL = 'http://cmis.dnsdojo.com:8080/p8cmis/resources/DaphneA/Service'
+REPOSITORY_URL = 'http://localhost:8080/alfresco/s/cmis'  # Alfresco
 #REPOSITORY_URL = 'http://cmis.demo.nuxeo.org/nuxeo/site/cmis/repository'
-#REPOSITORY_URL = 'http://localhost:8080/opencmis/atom' # OpenCMIS from the OpenText guys
+#REPOSITORY_URL = 'http://localhost:8080/opencmis/atom'  # OpenCMIS from the OpenText guys
 #REPOSITORY_URL = 'http://ec2-174-129-218-67.compute-1.amazonaws.com/cmis/atom' #OpenText
on Amazon
+#REPOSITORY_URL = 'http://localhost:8080/chemistry/atom'  # Apache Chemistry OpenCMIS
+
 # CMIS repository credentials
 USERNAME = 'admin'
 PASSWORD = 'admin'
-#USERNAME = 'Administrator' # Nuxeo
-#PASSWORD = 'Administrator' # Nuxeo
+#USERNAME = 'Administrator'  # Nuxeo
+#PASSWORD = 'Administrator'  # Nuxeo
 #USERNAME = 'cmisuser'
 #PASSWORD = 'otcmis'
 # Absolute path to a directory where test folders can be created, including
 # the trailing slash.
-#TEST_ROOT_PATH = '/default-domain/jeff test/' # REMEMBER TRAILING SLASH
-TEST_ROOT_PATH = '/cmislib test/' # REMEMBER TRAILING SLASH
+#TEST_ROOT_PATH = '/default-domain/jeff test'  # No trailing slash
+TEST_ROOT_PATH = '/cmislib test'  # No trailing slash
 #TEST_ROOT_PATH = '/'
 # Binary test files. Assumed to exist in the same dir as this python script
 TEST_BINARY_1 = '250px-Cmis_logo.png'
 TEST_BINARY_2 = 'sample-a.pdf'
+# For repositories that support setting an ACL, the name of an existing
+# principal ID to add to the ACL of a test object. Some repositories care
+# if this ID doesn't exist. Some repositories don't.
+TEST_PRINCIPAL_ID = 'tuser1'
 # For repositories that may index test content asynchronously, the number of
 # times a query is retried before giving up.
 MAX_FULL_TEXT_TRIES = 10
 # The number of seconds the test should sleep between tries.
-FULL_TEXT_WAIT = 10
\ No newline at end of file
+FULL_TEXT_WAIT = 10



Mime
View raw message