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

Changes to use mocks in tests #103

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

sivachandran
Copy link
Contributor

@sivachandran sivachandran commented Mar 24, 2021

The changes replace the use of mocky.io or real dependencies(e.g., RabbitMQ, Postgres servers) in tests with their mock versions.

Summary of changes

  • Used mock for RabbitMQ, Kafka, Postgres and HTTP servers
  • Moved DB mock from services to repository subpackage
  • Introduced memory-based DB MemoryDB to use in handlers subpackage tests
  • Fixed a bug in HTTPVal population code which was skipping the last header
  • Corrected some of the tests where the assertions were not correct, e.g., testing len(UUID) which is always true.

Addresses #100

@sivachandran sivachandran linked an issue Mar 24, 2021 that may be closed by this pull request
@sivachandran sivachandran changed the title Changes to use local mocks in tests Changes to use mocks in tests Mar 24, 2021
@sivachandran sivachandran marked this pull request as ready for review March 29, 2021 08:23
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.

Replace online API mocks with local API mocks in unit tests
1 participant