On 10/26/22 02:29, cold00water@gmail.com wrote:
I have only tested the operation on the web screen.
What exactly did you do to test this?
I ran c, but it doesn't work because of another error.
$ python test_thread.py Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site-packages/hyperkitty/tests/views/test_thread.py", line 29, in <module> from django.contrib.auth.models import User File "/opt/mailman/venv/lib/python3.10/site-packages/django/contrib/auth/models.py", line 2, in <module> from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/opt/mailman/venv/lib/python3.10/site-packages/django/contrib/auth/base_user.py", line 47, in <module> class AbstractBaseUser(models.Model): File "/opt/mailman/venv/lib/python3.10/site-packages/django/db/models/base.py", line 107, in __new__ app_config = apps.get_containing_app_config(module) File "/opt/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 252, in get_containing_app_config self.check_apps_ready() File "/opt/mailman/venv/lib/python3.10/site-packages/django/apps/registry.py", line 134, in check_apps_ready settings.INSTALLED_APPS File "/opt/mailman/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 76, in __getattr__ self._setup(name) File "/opt/mailman/venv/lib/python3.10/site-packages/django/conf/__init__.py", line 57, in _setup raise ImproperlyConfigured( 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.
Please tell me how to test.
You need to get the source. E.g.,
git clone https://gitlab.com/mailman/hyperkitty.git
This will create a hyperkitty
directory in the current directory. Then
you can test with tox. Ensure you have tox and then something like
tox -e py310-django32 -- hyperkitty/tests/views/test_thread.py
will run those tests. You can probably also test with pytest
, but when
I tried that I ran into issues with Django not finding settings.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan