Exemple #1
0
 class Meta(object):
     resource_name = 'identity'
     authentication = LoginAuthentication()
     serializer = ListToSingleObjectSerializer()
     detail_allowed_methods = []
     list_allowed_methods = ['get']
     object_class = CouchUser
     include_resource_uri = False
Exemple #2
0
 class Meta(object):
     resource_name = 'user_domains'
     authentication = LoginAuthentication(allow_session_auth=True)
     object_class = UserDomain
     include_resource_uri = False
Exemple #3
0
 def test_login_with_auth(self):
     self.assertAuthenticationSuccess(LoginAuthentication(),
                                      self._get_request_with_api_key())
Exemple #4
0
 def test_auth_type_basic(self):
     self.assertAuthenticationSuccess(LoginAuthentication(),
                                      self._get_request_with_basic_auth())
Exemple #5
0
 def test_login_no_auth(self):
     self.assertAuthenticationFail(LoginAuthentication(),
                                   self._get_request())