ahelium/monthlyrep — pull request #2 by anxiousmodernman (2014-11-13 01:53:41+00:00)
Title: Focusing on Unsubscribes report

I removed all the report classes except for ```Unsubscribes```, so this class no longer inherits from the class ```BaseReport```. Since you're new to classes, I want to stay focused on **one** class, just to show you want a class can do. Python is a simple language, but inheritance is surprisingly ugly in it.

Another thing I did was add a test file for the ```Unsubscribes``` class. It uses the built in ```unittest``` module that comes with Python. We've talked about this module before. To run the tests, create a "Python test" run config in pycharm (it's of the type unittest), and use that run config to run the ```unsub_report_test.py```.

All the test does is take the so-called "U" variable from settings (which ends up being a filepath, a string) and use it to construct a new instance of our ```Unsubscribes``` class. Then, it asserts that what we just constructed is in fact an instance of that class:

```python
self.assertIsInstance(test_report, Unsubscribes, msg="Should be an instance of class Unsubscribes")
```

The "msg" parameter is just something that ```unittest.TestCase``` provides, and if a test fails it can give you a nice message in the console.

I also removed the ```__init__.py``` entry from .gitignore. You do not want to ignore these files.