'Ticket #16329: sqlite3 in-memory test databases'

@unittest.skipUnless(all(((db.connections[conn].vendor == u'sqlite') for conn in db.connections)), u'This    is    an    sqlite-specific    issue')
def test_transaction_support(self):

    old_db_connections = db.connections
    for option in (u'NAME', u'TEST_NAME'):
        try:
            db.connections = db.ConnectionHandler({u'default': {u'ENGINE': u'django.db.backends.sqlite3', option: u':memory:'}, u'other': {u'ENGINE': u'django.db.backends.sqlite3', option: u':memory:'}})
            other = db.connections[u'other']
            runner.DiscoverRunner(verbosity=0).setup_databases()
            msg = (u"DATABASES    setting    '%s'    option    set    to    sqlite3's    ':memory:'    value    shouldn't    interfere    with    transaction    support    detection." % option)
            self.assertTrue(other.features.supports_transactions, msg)
            self.assertTrue(connections_support_transactions(), msg)
        finally:
            db.connections = old_db_connections
