-
Notifications
You must be signed in to change notification settings - Fork 84
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
Convert sydent/http/srvresolver.py and associated files to async/await #365
Conversation
Signed-off-by: H.Shay <shaysquared@gmail.com>
Ahh the 3.6 unit tests are failing (I suspect) because the older versions of mock don't automatically convert an asynchronous function to an asyncMock when patched in. I'll figure it out monday morning! |
We define an async mock somewhere in the Synapse test suite. (There's a |
So-after much researching and reading, (I haven't used mocks before, it's new to me!) I found a solution, which is to create an |
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.
Looks great, just a couple of minor comments!
This PR is the result of converting the file sydent/http/srvresolver.py to async/await, and updating the return value in other files that use or call the converted method (there was only one method in srvresolver.py which was converted.