updating test code to current standards

This is the start of an iteration for updating code to current formatting standards.
Also, replace dingus module with mock module.


Testing:
run in virtualenv
$ python setup.py nosetests