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

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

    for (option_key, option_value) in (('NAME', ':memory:'), ('TEST', {'NAME': ':memory:'})):
        tested_connections = db.ConnectionHandler({'default': {'ENGINE': 'django.db.backends.sqlite3', option_key: option_value}, 'other': {'ENGINE': 'django.db.backends.sqlite3', option_key: option_value}})
        with mock.patch('django.db.connections', new=tested_connections):
            with mock.patch('django.test.testcases.connections', new=tested_connections):
                other = tested_connections['other']
                DiscoverRunner(verbosity=0).setup_databases()
                msg = ("DATABASES    setting    '%s'    option    set    to    sqlite3's    ':memory:'    value    shouldn't    interfere    with    transaction    support    detection." % option_key)
                self.assertTrue(other.features.supports_transactions, msg)
                self.assertTrue(connections_support_transactions(), msg)
