Skip to content

Conversation

@IAL32
Copy link
Contributor

@IAL32 IAL32 commented Dec 6, 2022

Related: #28039 #28139 @Taragolis

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

@IAL32 IAL32 requested a review from eladkal as a code owner December 6, 2022 09:59
@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Dec 6, 2022
@potiuk
Copy link
Member

potiuk commented Dec 6, 2022

some tests failing :(

def test_poke_on_success_state(self, mock_get_job_description):
mock_get_job_description.return_value = {"status": "SUCCEEDED"}
assert self.batch_sensor.poke({})
assert self.batch_sensor.poke({}) is True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Small nitpick from @ferruzzi :
#28139 (review)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for including it here. 👍

Copy link
Contributor

@ferruzzi ferruzzi left a comment

Choose a reason for hiding this comment

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

LGTM. These are a big help, thanks for taking them on!

@Taragolis Taragolis self-requested a review December 7, 2022 18:29
@Taragolis Taragolis merged commit 5802469 into apache:main Dec 7, 2022
@IAL32 IAL32 deleted the ac/amazon-minor-test-fixes branch December 8, 2022 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants