refactored and fixed client tests.

Looks like there was a build in way to do what I needed to do. Who knew Mocha was that smart?