Requires use of a context manager within each test method for stdout/stderr patches, rather than the @patch.object decorator. Otherwise, the test runner hijacks the patched object before the method under test can use it.
Note: The `--buffer` switch in the unittest module will suppress all
output during the test, unless the test fails. However, with this implementation, anything that would have been printed to the streams within
the context manager will not be reflected in the test runner's output,
should the test fail.
See more in jay0lee/GAM#1068
* Begin breaking apart gam.py into logical pieces
Start with one of the deepest parts of the stack, Google API request execution calls and associated errors. Critical information printing functions and application control logic are also broken out into their own components.
This change also adds unit tests for migrated content and makes code more PEP8 compliant.
This commit starts work on jay0lee/GAM#147
* Add unit tests to Travis config
* Swap assert_called_once() with assertEqual() and Mock.call_count
Makes tests compatible with Python 3.5. assert_called_once() is only available in Python 3.6+