Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

src/e/r/erp5-HEAD/product/ERP5SyncML/Engine/EngineMixin.py   erp5(Download)
     IAuthenticationPlugin
 
from Products.ERP5SyncML.XMLSyncUtils import resolveSyncmlStatusCode, decode
from Products.ERP5SyncML.SyncMLMessage import SyncMLResponse
from Products.ERP5SyncML.SyncMLConstant import NULL_ANCHOR, ACTIVITY_PRIORITY, \
 
      if syncml_request.credentials['type'] == publication.getAuthenticationType():
        decoded = decode(syncml_request.credentials['format'],
                         syncml_request.credentials['data'])
        if decoded and ':' in decoded:

src/e/r/erp5-HEAD/product/ERP5SyncML/tests/testERP5SyncML.py   erp5(Download)
from Products.ERP5Type.tests.runUnitTest import tests_home
from Products.ERP5SyncML.Conduit.ERP5Conduit import ERP5Conduit
from Products.ERP5SyncML.XMLSyncUtils import encode, decode,\
     isDecodeEncodeTheSame
from Products.ERP5SyncML.XMLSyncUtils import getConduitByName
    string_encoded = encode('b64', python)
    self.assertEqual(string_encoded, awaited_result_python)
    string_decoded = decode('b64', awaited_result_python)
    self.assertEqual(string_decoded, python)
    self.assertTrue(isDecodeEncodeTheSame(string_encoded,
    string_encoded = encode('b64', long_string)
    self.assertEqual(string_encoded, awaited_result_long_string)
    string_decoded = decode('b64', awaited_result_long_string)
    self.assertEqual(string_decoded, long_string)
    self.assertTrue(isDecodeEncodeTheSame(string_encoded,
 
    self.assertEqual(encode('b64', ''), '')
    self.assertEqual(decode('b64', ''), '')
    self.assertTrue(isDecodeEncodeTheSame(
                    encode('b64', ''), '', 'b64'))