Converted test function to a proper nose-compatibile test.  PEP8 et al style cleanup