I would use 
```
function (db, test)
```
And if test is true, set the backends for test using db.  Cant think of a case where db and testdb would be different dbs...