django Test without creating database

-3

My tests.py

from django.core import mail
from django.test import SimpleTestCase


class EmailTest(SimpleTestCase):

    def test_send_email(self):
        mail.send_mail(
            'Test - Subject 1', 'Test de email, primer envio',
            '[email protected]', ['[email protected]'],
            fail_silently=False
           )
        self.assertEquals(len(mail.outbox), 1)
        self.assertEquals(mail.outbox[0].subject, 'Test - Subject 2')

I want to run the test without creating any database, is it possible?

    
asked by aztrock 30.05.2016 в 22:43
source

1 answer

0

Hello to use Django without creating or connecting to any database, which would imply not using Models that is the heart of Django, in the project in settings.py clean the contents of DATABASE.

DATABASES = {}

In our opinion, using Django without a database does not make sense, if you only want to show static views and use the syntax of Django Template I would recommend Flask + Jinja2 .

Greetings

    
answered by 30.03.2017 в 16:53