added tests for database
minor fixes found during writing tests
added local_settings.py into the .gitignore