Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

fix loggerIgnore issue and add unit tests #58

Merged
merged 3 commits into from
Mar 15, 2019

Conversation

netbsd8
Copy link
Contributor

@netbsd8 netbsd8 commented Mar 14, 2019

Note: this PR is now in pre-review state. Before running a official review, there are a couple of issue are need to be understanding:

  1. how to mock a lambda object
  2. error for "object MagicMock can't be used in 'await' expression"

This PR tries to fix the previous ignoring inputed logger issue mentioned here:
#56

It did the follows:

  1. Finding all occurences of instanciations of DNSClient and pass the logger as part of the context.
  2. Testing to confirm that a mocked DNSClient is called with logger passed to it.
  3. Creating DNSClient tests test/test_protocol.py where DNSClientProtocol{UDP,TCP} would be mocked and ensuring that DNSClient passes the logger to them.
  4. Replacing logger.debug with logger.exception in DNSClientProtocolUDP's error_received().

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@chantra chantra merged commit 797335b into facebookarchive:master Mar 15, 2019
@chantra
Copy link
Contributor

chantra commented Mar 15, 2019

Thanks @netbsd8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants