run_tests.sh: install factory and run tests with virtualenv
tests: fix tests/test_factory_specification.py()