-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Migrate amazon provider sensor tests from unittests to pytest
#28139
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
Conversation
|
Nice 👍 Could you also replace |
Taragolis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me looking good. But might be @ferruzzi @vandonr-amz @o-nikolas @vincbeck have some comments
vincbeck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ferruzzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one nitpick, but looks good. Thank you both for doing these, it's something I've been thinking about for a while
| def test_poke_on_success_state(self, mock_get_job_description): | ||
| mock_get_job_description.return_value = {"status": "SUCCEEDED"} | ||
| self.assertTrue(self.batch_sensor.poke({})) | ||
| assert self.batch_sensor.poke({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking suggestion: missed one is True here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh dang.
I included this change here: 9960d43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jarek sniped me on the merge, but it's all good. It's a minor thing.
…28145) Related: #28039 #28139 Migrate Amazon provider's transfer tests to `pytest`. All changes are more or less straightforward: - Get rid of unittests.TestCase class and TestCase.assert* methods - Convert setUp* and tearDown* methods to appropriate pytest alternative - Replace decorator `parameterized.expand` by `pytest.mark.parametrize`. - Renamed `@patch` to `@mock.patch` to conform to other tests
Related: #28039 @Taragolis
Migrate Amazon provider's sensors and utils tests to
pytest.All changes are more or less straightforward:
parameterized.expandbypytest.mark.parametrize.