Fixed test dependencies in setup.py.
Merge branch 'master' into test-enhancements
Used mock library to avoid some time.sleep() calls.