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