V1.4.x

This pull request addresses the issue  #3649.

nose and mock are now listed as `tests_require` dependencies in the setup.py and automatically installed when tests are executed with `python setup.py tests`. Most of the code in tests.py has been moved to that test command in the setup.py