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

Test for GET task history for a project #1626

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

azharcodeit
Copy link
Collaborator

@azharcodeit azharcodeit commented Jul 4, 2024

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Related to Issue #1614

Describe this PR

Added a test to get detailed task history for a project from GET tasks/{task_id}/history endpoint.
Created task and task_history fixtures for test data.

Screenshots

Screenshot 2024-07-04 at 13 03 28

Alternative Approaches Considered

Did you attempt any other approaches that are not documented in code?

Review Guide

Command to run all tests defined in the project using pytest:

docker compose run --rm api pytest

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

},
}
try:
tasks = await project_crud.create_tasks_from_geojson(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, using an existing function as mentioned on slack πŸ‘

@spwoodcock spwoodcock merged commit ec06348 into hotosm:development Jul 8, 2024
4 of 5 checks passed
spwoodcock added a commit that referenced this pull request Jul 8, 2024
* fix(hotfix): download of basemaps in ui, max zoom level 22 used for tms

* ci: update all gh-workflows to latest v1.6.0

* build: upgrade rclone --> v1 pin to avoid CVE-2024-24790

* build: remove unnecessary tables and field from db schema (#1623)

* build: remove unnecessary tables via migration & simplify schema

* refactor: remove references to removed tables in sqlalchemy models

* build: add IF EXISTS to DROP COLUMN in migration

* build: remove default columns from previous migration

* fix(backend): minor fixes to HTTPException on endpoints

* fix(backend): addded created date on the project response, set expiry of access token to 1 hour (#1633)

* docs: add placeholder for axiom repo activity

* fix(createProjectSlice): set generateProject & drawToggle status to default

* feat(commonUtils): isStatusSuccess function add

* test: get the detailed task history for a project (#1626)

* build(backend): add async-lru dep, remove cpuinfo dep

* fix: replace lru_cache with async for getting odk creds

* fix(splitTasks): dependency add to useEffect

* fix(createProjectService): halt project creation if api failure

---------

Co-authored-by: spwoodcock <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: Sujan Adhikari <[email protected]>
Co-authored-by: Azhar Ismagulova <[email protected]>
spwoodcock added a commit that referenced this pull request Jul 8, 2024
* fix(hotfix): download of basemaps in ui, max zoom level 22 used for tms

* ci: update all gh-workflows to latest v1.6.0

* build: upgrade rclone --> v1 pin to avoid CVE-2024-24790

* build: remove unnecessary tables and field from db schema (#1623)

* build: remove unnecessary tables via migration & simplify schema

* refactor: remove references to removed tables in sqlalchemy models

* build: add IF EXISTS to DROP COLUMN in migration

* build: remove default columns from previous migration

* fix(backend): minor fixes to HTTPException on endpoints

* fix(backend): addded created date on the project response, set expiry of access token to 1 hour (#1633)

* docs: add placeholder for axiom repo activity

* fix(createProjectSlice): set generateProject & drawToggle status to default

* feat(commonUtils): isStatusSuccess function add

* test: get the detailed task history for a project (#1626)

* build(backend): add async-lru dep, remove cpuinfo dep

* fix: replace lru_cache with async for getting odk creds

* fix(splitTasks): dependency add to useEffect

* fix(createProjectService): halt project creation if api failure

---------

Co-authored-by: spwoodcock <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: Sujan Adhikari <[email protected]>
Co-authored-by: Azhar Ismagulova <[email protected]>
spwoodcock added a commit that referenced this pull request Jul 8, 2024
* fix(frontend): prevent project generation if api failure

* Prevent project generation if api failure pt2 (#1635)

* fix(hotfix): download of basemaps in ui, max zoom level 22 used for tms

* ci: update all gh-workflows to latest v1.6.0

* build: upgrade rclone --> v1 pin to avoid CVE-2024-24790

* build: remove unnecessary tables and field from db schema (#1623)

* build: remove unnecessary tables via migration & simplify schema

* refactor: remove references to removed tables in sqlalchemy models

* build: add IF EXISTS to DROP COLUMN in migration

* build: remove default columns from previous migration

* fix(backend): minor fixes to HTTPException on endpoints

* fix(backend): addded created date on the project response, set expiry of access token to 1 hour (#1633)

* docs: add placeholder for axiom repo activity

* fix(createProjectSlice): set generateProject & drawToggle status to default

* feat(commonUtils): isStatusSuccess function add

* test: get the detailed task history for a project (#1626)

* build(backend): add async-lru dep, remove cpuinfo dep

* fix: replace lru_cache with async for getting odk creds

* fix(splitTasks): dependency add to useEffect

* fix(createProjectService): halt project creation if api failure

---------

Co-authored-by: spwoodcock <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: Sujan Adhikari <[email protected]>
Co-authored-by: Azhar Ismagulova <[email protected]>

* build: update to latest ms playwright image v1.45.1

---------

Co-authored-by: Nishit Suwal <[email protected]>
Co-authored-by: Sujan Adhikari <[email protected]>
Co-authored-by: Azhar Ismagulova <[email protected]>
@spwoodcock spwoodcock added the tests Related to automated code tests label Jul 17, 2024
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
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants