Skip to content

How to Write or test Post or Put api testcases ? #190

@Elixir-MeetThoriya

Description

@Elixir-MeetThoriya

this is my controller

@api_controller("users/", tags=["Users"])
 class UserController(BaseController):
     model = get_user_model()
     @http_post(
         path="",
         response={
             HTTPStatus.CREATED: UserSchema,
             HTTPStatus.INTERNAL_SERVER_ERROR: ErrorSchema,
             HTTPStatus.BAD_REQUEST: ErrorSchema,
         },
         # permissions=[AdminPermission],
         summary="Create Center User",
         description="This endpoint creates a new center user based on the provided data.",
         url_name="create_center_user"
     )
     def create(self, payload: UserInSchema):
         try:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions