예제 #1
0
파일: tests.py 프로젝트: veliaho/drest
 def __init__(self, username=None, password=None, *args, **kw):
     Client.__init__(self, *args, **kw)
     self._authorization = {}
     if username and password:
         auth = base64.b64encode('%s:%s' % (username, password))
         self._authorization = {
             'HTTP_AUTHORIZATION': 'Basic %s' % (auth,)
             }
예제 #2
0
파일: client.py 프로젝트: SongJLG/johan-doc
 def __init__(self, **kargs):
         self.prefix=settings.UNIT_URL[:-1]
         DClient.__init__(self, **kargs)
예제 #3
0
 def __init__(self, username=None, password=None, *args, **kw):
     Client.__init__(self, *args, **kw)
     self._authorization = {}
     if username and password:
         auth = base64.b64encode('%s:%s' % (username, password))
         self._authorization = {'HTTP_AUTHORIZATION': 'Basic %s' % (auth, )}
예제 #4
0
 def __init__(self, **kargs):
     self.prefix = settings.UNIT_URL[:-1]
     DClient.__init__(self, **kargs)