@pytest.mark.django_db
def test_backend_db():
 from django.db import connection, connections
 if (connection.vendor == 'sqlite'):
  assert (connections.databases['default']['NAME'] == ':memory:')

@ pytest . mark . django_db def test_backend_db ( ) : from django . db import connection , connections if ( connection . vendor == 'sqlite' ) : assert ( connections . databases [ 'default' ] [ 'NAME' ] == ':memory:' )
ensure that we are always testing sqlite on fast in memory db .