only run tests if run from the command line
Refactored Base to the common models
Fixed default environment
First relationships written
Better test file name
Database relationships written, pass unit tests