'Return a tuple that uniquely identifies a test database.
This takes into account the special cases of ":memory:" and "" for
SQLite since the databases will be distinct despite having the same
TEST NAME. See http://www.sqlite.org/inmemorydb.html'

def test_db_signature(self):

    test_database_name = self._get_test_db_name()
    sig = [self.connection.settings_dict['NAME']]
    if self.is_in_memory_db(test_database_name):
        sig.append(self.connection.alias)
    return tuple(sig)
