sks444 / openhub-django

MIT License
4 stars 1 forks source link

pytest failing on project #3

Open KVGarg opened 5 years ago

KVGarg commented 5 years ago
====================================================================== test session starts =======================================================================
platform linux -- Python 3.6.8, pytest-3.6.4, py-1.8.0, pluggy-0.7.1
rootdir: /home/kvgarg/GSoC/openhub-django, inifile:
plugins: requests-mock-1.6.0, travis-fold-1.3.0, timeout-1.3.3, reqs-0.2.0, reorder-0.1.1, profiling-1.3.0, mock-1.10.4, instafail-0.3.0, error-for-skips-1.0.0, env-0.6.2, django-3.3.3, cov-2.7.1
collected 0 items / 11 errors                                                                                                                                    

============================================================================= ERRORS =============================================================================
_________________________________________ ERROR collecting tests/management_commands/test_affiliated_committers_data.py __________________________________________
tests/management_commands/test_affiliated_committers_data.py:6: in <module>
    from openhub_django.models import AffiliatedCommitter
openhub_django/models.py:11: in <module>
    class OpenhubOrganization(models.Model):
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/db/models/base.py:87: in __new__
    app_config = apps.get_containing_app_config(module)
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/apps/registry.py:249: in get_containing_app_config
    self.check_apps_ready()
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/apps/registry.py:131: in check_apps_ready
    settings.INSTALLED_APPS
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/conf/__init__.py:57: in __getattr__
    self._setup(name)
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/conf/__init__.py:42: in _setup
    % (desc, ENVIRONMENT_VARIABLE))
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.
.
.
.
_________________________________________________ ERROR collecting tests/models/test_portfolio_project_model.py __________________________________________________
tests/models/test_portfolio_project_model.py:3: in <module>
    from openhub_django.models import (
openhub_django/models.py:11: in <module>
    class OpenhubOrganization(models.Model):
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/db/models/base.py:87: in __new__
    app_config = apps.get_containing_app_config(module)
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/apps/registry.py:249: in get_containing_app_config
    self.check_apps_ready()
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/apps/registry.py:131: in check_apps_ready
    settings.INSTALLED_APPS
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/conf/__init__.py:57: in __getattr__
    self._setup(name)
../../anaconda3/envs/community-env/lib/python3.6/site-packages/django/conf/__init__.py:42: in _setup
    % (desc, ENVIRONMENT_VARIABLE))
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.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 11 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================== 11 error in 0.93 seconds ====================================================================
KVGarg commented 5 years ago

Just got that this project uses runtests.py to run the tests. Won't it be good to run the tests via pytests ?