Fix database connection settings on template instanciation

Closes #174
Enhances testsuite to ensure test.js settings are read