0

I am trying to run a simple django test:

tests.py

from django.test import TestCase

class EasyTest(TestCase):
    def test_1(self):
        x = 2
        y = x * 2
        self.assertEqual(y, 4)

settings.py

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'db01',
        'USER': 'admin',
        'PASSWORD': '18101974Oo',
        'HOST': 'localhost',
        'PORT': 44321,
    },
}

But I am getting an error

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.

If i use the same code but do import from unittest everything works

  • Does this answer your question? [ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value](https://stackoverflow.com/questions/26080303/improperlyconfigured-settings-databases-is-improperly-configured-please-supply) – Sunderam Dubey Oct 11 '22 at 14:08

0 Answers0