I am getting this error from 2 days ,Not able to fix.i am trying to do unit testing using pytest,

E django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.