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

Remove make_mocked_coro() #9212

Open
Dreamsorcerer opened this issue Sep 21, 2024 · 8 comments
Open

Remove make_mocked_coro() #9212

Dreamsorcerer opened this issue Sep 21, 2024 · 8 comments
Labels
enhancement good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ tests

Comments

@Dreamsorcerer
Copy link
Member

aiohttp.test_utils.make_mocked_coro() basically does what mock.AsyncMock() does and is not relevant today.

We should remove it, but there are still a lot of references to it in the tests, so will require replacing all those references (with mock.patch, mock.create_autospec etc.).

@Dreamsorcerer Dreamsorcerer added enhancement good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ labels Sep 21, 2024
@TheMarvelFan
Copy link

Hi,

Is anyone working on this issue?
If not, I would like to take it up.

Thanks!

@Dreamsorcerer
Copy link
Member Author

Go ahead. I think there's probably a lot of uses of the function, so you may want to replace the function from a couple of files in each PR, to avoid too many change resulting in conflicts.

@TheMarvelFan
Copy link

I searched through the repo and it reports 85 references throughout the code. I think I can do this in 4 PRs, modifying roughly 20 references in each.

If you have any suggestions, please feel free to give them!

@TheMarvelFan
Copy link

Hi @Dreamsorcerer ,

I have modified a few files in this PR. Please review the changes and let me know if any corrections are required.
I will create the next PR once this one is approved.

Thanks!

@TheMarvelFan
Copy link

Hi @Dreamsorcerer ,
It looks like I am going to be busy this month, due to my approaching midterm exams. So, I would not be able to follow through with this issue.
Besides this, I also got 4 PRs merged for Hacktoberfest, so I want to leave this issue open for someone else who wants to participate.
I have closed my PR.
Hope this is understandable.

@akshayphdk
Copy link

I can take a look at this if this is still open.

@Dreamsorcerer
Copy link
Member Author

Go ahead. See the linked PR and feedback for a head-start (you could start by forking that one).

@mhaoda
Copy link

mhaoda commented Oct 5, 2024

Hey @akshayphdk, can I work on this issue together with you? There should be 17 files need to be updated, and If you continue the work on the linked PR (involves 13 files) I can create another PR for the rest 4 files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Good for newcomers Hacktoberfest We think it's good for https://hacktoberfest.digitalocean.com/ tests
Projects
Development

No branches or pull requests

5 participants