Changes to run tests with tox or travis using factory-boy and mock.