some changes to test_script, to make it more versatile, and points settings.py to correct database