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

Improve usage of mocks in testing #1987

Open
jemrobinson opened this issue Jul 3, 2024 · 0 comments
Open

Improve usage of mocks in testing #1987

jemrobinson opened this issue Jul 3, 2024 · 0 comments
Labels
enhancement New functionality that should be added to the Safe Haven needs decision Requires dev team to come to an agreement on how to proceed release: non-essential Issues that at not essential to close for a release
Milestone

Comments

@jemrobinson
Copy link
Member

jemrobinson commented Jul 3, 2024

There are several ways in which we could improve our use of mocks:

  1. Checking for asserts

assert "mock deploy" in result.stdout
assert "mock deploy error" in result.stdout

I think I used this kind of pattern before I realised Mock.assert_called() and related methods existed.

Originally posted by @JimMadge in #1982 (comment)

  1. Better consolidation of default config files/objects

  2. Clarity about the best way to mock objects with complex __init__s

@jemrobinson jemrobinson added this to the Release 5.0.0rc2 milestone Jul 3, 2024
@jemrobinson jemrobinson added enhancement New functionality that should be added to the Safe Haven needs decision Requires dev team to come to an agreement on how to proceed release: non-essential Issues that at not essential to close for a release labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality that should be added to the Safe Haven needs decision Requires dev team to come to an agreement on how to proceed release: non-essential Issues that at not essential to close for a release
Projects
None yet
Development

No branches or pull requests

1 participant