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

All Samples(1196)  |  Call(1171)  |  Derive(0)  |  Import(25)

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_policy.py   LinOTP(Download)
 
import logging
from linotp.tests import TestController, url
import re
from json import loads
                       'selftest_admin' : 'superadmin'
                      }
        response = self.app.get(url(controller='system', action='setPolicy'), params=parameters)
        log.error(response)
        assert '"status": true' in response
                       'selftest_admin' : 'superadmin'
                      }
        response = self.app.get(url(controller='system', action='setPolicy'), params=parameters)
        log.error(response)
        assert '"status": true' in response
        '''
        parameters = { 'selftest_admin' : 'adminR1'}
        response = self.app.get(url(controller='system', action='getPolicy'), params=parameters)
        log.error(response)
        assert '"status": true' in response
                       'selftest_admin' : 'superadmin'
                      }
        response = self.app.get(url(controller='system', action='setPolicy'), params=parameters)
        log.error(response)
        assert '"status": true' in response

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_ocra2.py   LinOTP(Download)
 
 
from linotp.tests import TestController, url
 
 
    def setupOcraPolicy(self):
        '''
        This sets up the ocra policy right
        '''
        response = self.app.get(url(controller='system', action='setPolicy'), params={'name' : 'ocra_allowance',
        }
        params['action'] = 'qrtanurl=%s' % (unicode(check_url))
        response = self.app.get(url(controller='system', action='setPolicy'), params=params)
 
        log.error(response)
    def check_otp(self, transid, otp, pin='pin'):
        ''' -3.a- verify the otp value to finish the rollout '''
        parameters = {"transactionid"   : transid, "pass" : '' + pin + otp }
        response = self.app.get(url(controller='validate', action='check_t'), params=parameters)
        return response
 
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        return response
 

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_ocra.py   LinOTP(Download)
 
 
from linotp.tests import TestController, url
 
 
    def setupOcraPolicy(self):
        '''
        This sets up the ocra policy right
        '''
        response = self.app.get(url(controller='system', action='setPolicy'), params={'name' : 'ocra_allowance',
        }
        params['action'] = 'qrtanurl=%s' % (unicode(check_url))
        response = self.app.get(url(controller='system', action='setPolicy'), params=params)
 
        log.error(response)
    def check_otp(self, transid, otp, pin='pin'):
        ''' -3.a- verify the otp value to finish the rollout '''
        parameters = {"transactionid"   : transid, "pass" : '' + pin + otp }
        response = self.app.get(url(controller='ocra', action='check_t'), params=parameters)
        return response
 
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        return response
 

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_validate.py   LinOTP(Download)
import hashlib
 
from linotp.tests import TestController, url
from simplejson import loads
 
                      }
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        assert '"value": true' in response
 
 
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        assert '"value": true' in response
 
                      }
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        assert '"value": true' in response
 
        if realm is not None:
            parameters.update(realm)
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        assert '"value": true' in response
 

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_selfservice.py   LinOTP(Download)
import logging
 
from linotp.tests import TestController, url
 
log = logging.getLogger(__name__)
    def createPolicy(self, policy):
        response = self.app.get(url(controller='system', action='setPolicy'),
                                params={'name' : 'self01',
                                        'scope' : 'selfservice',
                                        'realm' : 'myDefRealm',
    def deleteToken(self, serial):
        response = self.app.get(url(controller='admin', action='remove'),
                                params={'serial': serial,
                                        'selftest_admin' : 'superadmin'})
 
        self.createPolicy("history")
 
        response = self.app.get(url(controller='selfservice', action='userhistory'),
                                params={'selftest_user': 'root@myDefRealm'})
        print response
        assert '"rows": [' in response
 
        response = self.app.get(url(controller='selfservice', action='history'),

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_admin.py   LinOTP(Download)
 
import logging
from linotp.tests import TestController, url
 
log = logging.getLogger(__name__)
                      }
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        self.assertTrue('"value": true' in response, response)
 
                      }
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        self.assertTrue('"value": true' in response, response)
        return serial
                      "hashlib" : "sha256"
                      }
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        self.assertTrue('"value": true' in response, response)
        return serial
                      }
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        self.assertTrue('"value": true' in response, response)
 

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_challenge_response.py   LinOTP(Download)
    import simplejson as json
 
from linotp.tests import TestController, url
from linotp.lib.HMAC import HmacOtp
from mock import patch
    def deleteAllPolicies(self):
        '''
        '''
        response = self.app.get(url(controller='system', action='getPolicy'),)
        self.assertTrue('"status": true' in response, response)
    def deleteAllTokens(self):
        serials = []
 
        response = self.app.get(url(controller='admin', action='show'),
                                )
            parameters['email_address'] = email_address
 
        response = self.app.get(url(controller='admin', action='init'),
                                params=parameters)
        self.assertTrue('"value": true' in response, response)
                      }
 
        response = self.app.get(url(controller='admin', action='remove'),
                                params=parameters)
        return response

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_authorize.py   LinOTP(Download)
import datetime
 
from linotp.tests import TestController, url
 
 
 
 
        response = self.app.get(url(controller='admin', action='init'), params=parameters)
        assert '"value": true' in response
 
                      }
 
        response = self.app.get(url(controller='admin', action='remove'), params=parameters)
        return response
 
    def setTokenRealm(self, serial, realms):
        parameters = { "serial" : serial,
                       "realms" : realms}
 
        response = self.app.get(url(controller="admin", action="tokenrealm"), params=parameters)
        return response
 
    def delPolicy(self, name):
 
        response = self.app.get(url(controller="system", action="delPolicy"),

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_system.py   LinOTP(Download)
 
import logging
from linotp.tests import TestController, url
 
 
                      "DefaultResetFailCount" : "False"
                      }
        response = self.app.get(url(controller='system', action='setDefault'), params=parameters)
        #log.debug("response %s\n",response)
        assert '"set DefaultSyncWindow": true' in response
                      }
 
        response = self.app.get(url(controller='system', action='setDefault'), params=parameters)
        #log.info("response %s\n",response)
        assert '"set DefaultSyncWindow": true' in response
                     }
 
        response = self.app.get(url(controller='admin', action='userlist'), params=parameters)
        parameters = {
                      "username":"root",
                      "realm":"myMixRealm"
                      }
 
        response = self.app.get(url(controller='admin', action='userlist'), params=parameters)

src/l/i/LinOTP-2.6.1.1/linotp/tests/functional/test_manage.py   LinOTP(Download)
    import simplejson
 
from linotp.tests import TestController, url
 
log = logging.getLogger(__name__)
 
        # create resolvers
        response = self.app.get(url(controller='system', action='setResolver'),
                                params={'name':'reso1',
                                        'type': 'passwdresolver',
                                        'fileName': 'my-passwd'})
        print response
        assert '"value": true' in response
 
        response = self.app.get(url(controller='system', action='setResolver'),
        # create realms
 
        response = self.app.get(url(controller='system', action='setRealm'),
                                params={'realm': 'realm1',
                                        'resolvers': 'useridresolver.PasswdIdResolver.IdResolver.reso1'})
        print response
        assert '"value": true' in response
 
        response = self.app.get(url(controller='system', action='setRealm'),

  1 | 2 | 3  Next