whatsplay / whatsapp-play

Command line software through which you can play with your WhatsApp. It is having different options to play with your WhatsApp like message blast, online tracking, whatsapp chat..
MIT License
405 stars 217 forks source link

Automated unit test case added for Logger.py successfully. #272

Closed SinghHimadri closed 4 years ago

SinghHimadri commented 4 years ago

Issue that this pull request solves

102 Closes: # (issue number)

Proposed changes

test_logger.py file added in tests folder Brief description of what is fixed or changed A Log file is created using Logger class in Logger.py and the log is tested in two ways.

  1. The logfile is checked if its created and exists on right path.
  2. Class LoggingTestCase, which inherits from unittest.TestCase. For every test run, logs are automatically captured to self.captured_logs. If the test fails, the contents of self.captured_logs are written to the test output for easy debugging. Using assertLogs to test that at least one message is logged on the logger or one of its children, with at least the given level. Then using asserEqual to compare the file content.

    Types of changes

    A python file added in tests folder Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply

Screenshots

Please attach the screenshots of the changes made in case of change in user interface Screenshot from 2020-04-02 18-58-36

Other information

Any other information that is important to this pull request

rpotter12 commented 4 years ago

Codacy Here is an overview of what got changed by this pull request:


Complexity increasing per file
==============================
- tests/test_logger.py  2

See the complete overview on Codacy

SinghHimadri commented 4 years ago

@rpotter12 @xandao6 @priyansh19 Please review.