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 mocked tests: get_backup_policy #345

Closed
loosla opened this issue Oct 1, 2024 · 3 comments · Fixed by #351
Closed

Add mocked tests: get_backup_policy #345

loosla opened this issue Oct 1, 2024 · 3 comments · Fixed by #351
Assignees
Labels
good first issue Good for newcomers hacktoberfest A good hacktoberfest issue! help wanted Extra attention is needed

Comments

@loosla
Copy link
Contributor

loosla commented Oct 1, 2024

Overview

Enhance test coverage by adding mocked test for the function that retrieves the backup policy for an existing droplet - get_backup_policy.

Mocked tests do not act against the real API so no real resources are created.

To run mocked tests, run: make test-mocked

Instructions

  1. Clone this repo.
  2. If you haven't already, install Python (version: >= 3.7.2) through their official installer.
  3. CD into the directory and run make install
  4. Open file: tests/mocked/test_droplets.py
  5. Add a mocked test with the name test_get_backup_policy for droplets.get_backup_policy.

Note: The function implementation can be found in src/pydo/operations/_operations.py.

@loosla loosla added good first issue Good for newcomers help wanted Extra attention is needed hacktoberfest A good hacktoberfest issue! labels Oct 1, 2024
@gagan-bhullar-tech
Copy link
Contributor

@loosla get_backup_policy method is in DropletOperations. I think we need to add test case in test_droplets.py. Can you please confirm. Also, please assign it to me.

@loosla
Copy link
Contributor Author

loosla commented Oct 1, 2024

Thank you for catching that! I’ve updated the description.

@gagan-bhullar-tech
Copy link
Contributor

@loosla thanks. Created PR. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest A good hacktoberfest issue! help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants