diff options
| author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-09-12 15:06:58 +0000 |
|---|---|---|
| committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-09-12 15:06:58 +0000 |
| commit | 9ed0670e48665f590eda685e0cfebf8c4cadb8fb (patch) | |
| tree | a3f909876ca336256b304de9a350ab526d16abea /bindings/python/tests | |
| parent | 73d9c98f92b9664c6d78843c4110b71520fa3f67 (diff) | |
| download | lasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.tar.gz lasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.tar.xz lasso-9ed0670e48665f590eda685e0cfebf8c4cadb8fb.zip | |
* Remove ending blanks
Diffstat (limited to 'bindings/python/tests')
| -rw-r--r-- | bindings/python/tests/XmlTestRunner.py | 6 | ||||
| -rwxr-xr-x | bindings/python/tests/binding_tests.py | 4 | ||||
| -rwxr-xr-x | bindings/python/tests/idwsf1_tests.py | 18 | ||||
| -rwxr-xr-x | bindings/python/tests/idwsf2_tests.py | 26 | ||||
| -rwxr-xr-x | bindings/python/tests/profiles_tests.py | 6 | ||||
| -rwxr-xr-x | bindings/python/tests/tests.py | 10 |
6 files changed, 35 insertions, 35 deletions
diff --git a/bindings/python/tests/XmlTestRunner.py b/bindings/python/tests/XmlTestRunner.py index 152dc8b2..3fa8a239 100644 --- a/bindings/python/tests/XmlTestRunner.py +++ b/bindings/python/tests/XmlTestRunner.py @@ -5,19 +5,19 @@ # XmlTestRunner # # Copyright (C) 2004-2007 Entr'ouvert -# +# # Authors: Frederic Peters <fpeters@entrouvert.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/bindings/python/tests/binding_tests.py b/bindings/python/tests/binding_tests.py index d86d519b..872d2f3c 100755 --- a/bindings/python/tests/binding_tests.py +++ b/bindings/python/tests/binding_tests.py @@ -14,12 +14,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/bindings/python/tests/idwsf1_tests.py b/bindings/python/tests/idwsf1_tests.py index 3dc5cf86..a2f26b83 100755 --- a/bindings/python/tests/idwsf1_tests.py +++ b/bindings/python/tests/idwsf1_tests.py @@ -12,12 +12,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -98,7 +98,7 @@ class IdWsf1TestCase(unittest.TestCase): sp_login.request.nameIdPolicy = lasso.LIB_NAMEID_POLICY_TYPE_FEDERATED sp_login.request.protocolProfile = lasso.LIB_PROTOCOL_PROFILE_BRWS_POST sp_login.buildAuthnRequestMsg() - + idp_login = lasso.Login(idp) idp_login.processAuthnRequestMsg(sp_login.msgBody) idp_login.validateRequestMsg(True, True) @@ -182,7 +182,7 @@ class DiscoveryModifyTestCase(IdWsf1TestCase): # Process Modify request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody) - self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY) + self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY) idp_disco = lasso.Discovery(self.idp) idp_disco.processModifyMsg(wsp_disco.msgBody) idp_disco.setIdentityFromDump(idp_identity_dump) @@ -216,7 +216,7 @@ class DiscoveryRemoveTestCase(IdWsf1TestCase): # Process Modify request_type = lasso.getRequestTypeFromSoapMsg(wsp_disco.msgBody) - self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY) + self.failUnless(request_type == lasso.REQUEST_TYPE_DISCO_MODIFY) idp_disco = lasso.Discovery(self.idp) idp_disco.processModifyMsg(wsp_disco.msgBody) idp_disco.setIdentityFromDump(idp_identity_dump) @@ -274,7 +274,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase): wsc_service.buildRequestMsg() request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody) - self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) + self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) self.wsp = self.get_wsp_server() wsp_service = lasso.DataService(self.wsp) @@ -313,9 +313,9 @@ class DataServiceModifyTestCase(IdWsf1TestCase): wsc_service = self.get_pp_service() wsc_service.initModify(xpath, new_data) wsc_service.buildRequestMsg() - + request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody) - self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) + self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) self.wsp = self.get_wsp_server() wsp_service = lasso.DataService(self.wsp) @@ -347,7 +347,7 @@ class DataServiceModifyTestCase(IdWsf1TestCase): wsc_service.buildRequestMsg() request_type = lasso.getRequestTypeFromSoapMsg(wsc_service.msgBody) - self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) + self.failUnless(request_type == lasso.REQUEST_TYPE_DST_MODIFY) self.wsp = self.get_wsp_server() wsp_service = lasso.DataService(self.wsp) diff --git a/bindings/python/tests/idwsf2_tests.py b/bindings/python/tests/idwsf2_tests.py index 0c52a321..7500ab25 100755 --- a/bindings/python/tests/idwsf2_tests.py +++ b/bindings/python/tests/idwsf2_tests.py @@ -14,12 +14,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -79,7 +79,7 @@ class IdWsf2TestCase(unittest.TestCase): server.getProvider(server.providerIds[0]).setEncryptionMode(lasso.ENCRYPTION_MODE_NAMEID); server.addProvider(lasso.PROVIDER_ROLE_SP, wsc_metadata, None, None) self.idp_server_dump = server.dump() - + return server def idpRegisterSelf(self, idp_server): @@ -131,7 +131,7 @@ class IdWsf2TestCase(unittest.TestCase): idp_identity_dump = idp_login.identity.dump() if idp_login.isSessionDirty: idp_session_dump = idp_login.session.dump() - + sp_login = lasso.Login(sp) query = idp_login.msgUrl.split('?')[1] query = query.replace("%3D", "=") @@ -416,9 +416,9 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase): wsp_disco.setSessionFromDump(wsp_session_dump) wsp_disco.initMetadataAssociationAdd(svcMDID) wsp_disco.buildRequestMsg() - + self.failUnless(wsp_disco.msgBody, 'missing msgBody') - + def test05(self): """Process metadata association add request""" idp = self.getIdpServer() @@ -436,7 +436,7 @@ class MetadataAssociationAddTestCase(IdWsf2TestCase): wsp_disco.buildRequestMsg() idp_disco = lasso.IdWsf2Discovery(idp) - + try: idp_disco.processMetadataAssociationAddMsg(wsp_disco.msgBody) except lasso.Error, e: @@ -1217,7 +1217,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service, wsp = self.getProfileService() lasso.registerIdWsf2DstService('pp2', 'urn:liberty:id-sis-pp:2005-05') service.initQuery() - + try: service.addQueryItem('/pp2:PP/pp2:InformalName', 'name') except lasso.Error, e: @@ -1230,7 +1230,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service.initQuery() service.addQueryItem('/pp2:PP/pp2:InformalName', 'name') service.buildRequestMsg() - + self.failUnless(service.msgBody, 'missing msgBody') def test05(self): @@ -1242,7 +1242,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service.addQueryItem('not existing attribute', 'not existing attribute') service.addQueryItem('/pp2:PP/pp2:MsgContact', 'email') service.buildRequestMsg() - + self.failUnless(service.msgBody, 'missing msgBody') def test06(self): @@ -1589,7 +1589,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service.processQueryResponseMsg(wsp_service.msgBody) informal_name = service.getAttributeNode() - + self.failUnlessEqual(informal_name, """<pp2:InformalName xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">User name</pp2:InformalName>""", 'first attribute node is wrong') def test21(self): @@ -1617,7 +1617,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service.processQueryResponseMsg(wsp_service.msgBody) informal_name = service.getAttributeString('name') - + self.failUnlessEqual(informal_name, 'User name', 'attribute string is wrong') def test22(self): @@ -1645,7 +1645,7 @@ class DataServiceQueryTestCase(IdWsf2TestCase): service.processQueryResponseMsg(wsp_service.msgBody) email = service.getAttributeNode('email') - + expected_result = """<pp2:MsgContact xmlns="urn:liberty:id-sis-pp:2005-05" xmlns:pp2="urn:liberty:id-sis-pp:2005-05">.*?<pp2:MsgAccount>Email account</pp2:MsgAccount>.*?<pp2:MsgProvider>Email server</pp2:MsgProvider>.*?</pp2:MsgContact>""" import re diff --git a/bindings/python/tests/profiles_tests.py b/bindings/python/tests/profiles_tests.py index 84647b21..b1dd0442 100755 --- a/bindings/python/tests/profiles_tests.py +++ b/bindings/python/tests/profiles_tests.py @@ -14,12 +14,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -207,7 +207,7 @@ class LoginTestCase(unittest.TestCase): self.failUnless('<action>do</action>' in extensionsList[0]) self.failUnless('<action2>do action 2</action2>' in extensionsList[0]) self.failUnless('<action3>do action 3</action3>' in extensionsList[0]) - + class LogoutTestCase(unittest.TestCase): def test01(self): diff --git a/bindings/python/tests/tests.py b/bindings/python/tests/tests.py index 9915a64e..14c8c864 100755 --- a/bindings/python/tests/tests.py +++ b/bindings/python/tests/tests.py @@ -14,12 +14,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -68,13 +68,13 @@ if options.xmlMode: print """<testsuites xmlns="http://check.sourceforge.net/ns">""" print """ <title>Python Bindings</title>""" print """ <datetime>%s</datetime>""" % time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()) - + success = True for testSuite in testSuites: fp, pathname, description = imp.find_module(testSuite) - try: + try: module = imp.load_module(testSuite, fp, pathname, description) - finally: + finally: if fp: fp.close() if not module: |
