コード例 #1
0
 def should_not_add_auth_credentials_if_none_is_set(self):
     self.request.credentials = None
     authprocessor = AuthenticationProcessor()
     authprocessor.execute(self.chain, self.request, {})
     assert not self.request.headers.has_key('authorization')
コード例 #2
0
 def should_not_add_auth_credentials_if_none_is_set(self):
     self.request.credentials = None
     authprocessor = AuthenticationProcessor()
     authprocessor.execute(self.chain, self.request, {})
     assert not self.request.headers.has_key('authorization')
コード例 #3
0
 def should_add_simple_auth_credentials_to_request_headers(self):
     self.request.credentials = ('user', 'pass', 'simple')
     authprocessor = AuthenticationProcessor()
     authprocessor.execute(self.chain, self.request, {})
     assert self.request.headers.has_key('authorization')
     assert "Basic" in self.request.headers['authorization']
コード例 #4
0
 def should_add_simple_auth_credentials_to_request_headers(self):
     self.request.credentials = ('user', 'pass', 'simple')
     authprocessor = AuthenticationProcessor()
     authprocessor.execute(self.chain, self.request, {})
     assert self.request.headers.has_key('authorization')
     assert "Basic" in self.request.headers['authorization']