Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functional pytest tests for main mapping endpoints #1614

Closed
6 of 7 tasks
spwoodcock opened this issue Jul 1, 2024 · 2 comments
Closed
6 of 7 tasks

Add functional pytest tests for main mapping endpoints #1614

spwoodcock opened this issue Jul 1, 2024 · 2 comments
Assignees
Labels
backend Related to backend code tests Related to automated code tests

Comments

@spwoodcock
Copy link
Member

spwoodcock commented Jul 1, 2024

Is your feature request related to a problem? Please describe.

Key endpoints for mappers are:

  • GET auth/introspect not tested as requires frontend to handle cookies etc
  • GET projects/summaries
  • GET projects/{project_id}
  • GET projects/{project_id}/entities/statuses
  • GET tasks/{task_id}/history
  • POST tasks/{task_id}/new-status/{status_number}
  • POST projects/{project_id}/entity/status

Describe the solution you'd like

Write tests for the above endpoints.

@azharcodeit
Copy link
Collaborator

azharcodeit commented Jul 10, 2024

This issue will be resolved once the rest of the endpoints are covered with tests that require an access token:

  • GET auth/introspect
  • POST tasks/{task_id}/new-status/{status_number}

As soon as the access token is figured out, I will prepare the corresponding PRs. 🚀

@spwoodcock
Copy link
Member Author

If the introspect one takes a while to work out, then don't worry about it for now.

We can probably more easily handle the login stuff via Playwright including the frontend too.

To test as backend only I believe it would require setting DEBUG=False on the API and also updating the OSM redirect URL to go to the backend and not the frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code tests Related to automated code tests
Projects
Development

No branches or pull requests

2 participants