Skip to content

Conversation

@pablodiegoss
Copy link
Member

Description

Mocking objects on the Jandig database was always an issue for testing, since we upload files to storage and filesystem after upload. This PR adds an in-memory storage for testing, enabling the execution of unit tests on the new API created for Markers.

General tasks performed

  • Updated Marker API from ListAPIView to VIewset
  • Added dj-in-memory as a dependency
  • Updated tests from running on manage.py test to pytest
  • Created tests for API list and retrieve of Markers

Have you confirmed the application builds locally without error? See here.

  • Yes

Copy link
Collaborator

@durvalcarvalho durvalcarvalho left a comment

Choose a reason for hiding this comment

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

Well done! I ran the tests locally and they all passed correctly! Excellent work!

The only thing I noticed is that the path to the environment variables file (.env) in docker-compose.yml is incorrect. In my environment I changed it to - src/.envs/.env and it worked.

@durvalcarvalho durvalcarvalho merged commit 68e5575 into memeLab:develop Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants