Use mock to set as_legacy_object in test
Add test dependencies to tox.ini

Test deps defined in setup.py should also be explicit in tox