| 36 | |
| 37 | I found that there is a `test_postgresql` module but when I try to test it |
| 38 | |
| 39 | {{{ |
| 40 | ./runtests.py --settings=dbshell.test_postgresql --parallel=1 --keepdb schema |
| 41 | }}} |
| 42 | |
| 43 | it gives me the following error, could you please help? |
| 44 | |
| 45 | {{{ |
| 46 | Testing against Django installed in '/Python/django/django' |
| 47 | Traceback (most recent call last): |
| 48 | File "/Python/django/django/utils/connection.py", line 58, in __getitem__ |
| 49 | return getattr(self._connections, alias) |
| 50 | File "/Python/django/lib/python3.8/site-packages/asgiref/local.py", line 107, in __getattr__ |
| 51 | raise AttributeError(f"{self!r} object has no attribute {key!r}") |
| 52 | AttributeError: <asgiref.local.Local object at 0x7fd81f6d4880> object has no attribute 'default' |
| 53 | |
| 54 | During handling of the above exception, another exception occurred: |
| 55 | |
| 56 | Traceback (most recent call last): |
| 57 | File "./runtests.py", line 657, in <module> |
| 58 | failures = django_tests( |
| 59 | File "./runtests.py", line 348, in django_tests |
| 60 | test_labels, state = setup_run_tests(verbosity, start_at, start_after, test_labels) |
| 61 | File "./runtests.py", line 278, in setup_run_tests |
| 62 | test_modules, state = setup_collect_tests(start_at, start_after, test_labels=test_labels) |
| 63 | File "./runtests.py", line 193, in setup_collect_tests |
| 64 | 'INSTALLED_APPS': settings.INSTALLED_APPS, |
| 65 | File "/Python/django/django/conf/__init__.py", line 89, in __getattr__ |
| 66 | self._setup(name) |
| 67 | File "/Python/django/django/conf/__init__.py", line 76, in _setup |
| 68 | self._wrapped = Settings(settings_module) |
| 69 | File "/Python/django/django/conf/__init__.py", line 184, in __init__ |
| 70 | mod = importlib.import_module(self.SETTINGS_MODULE) |
| 71 | File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module |
| 72 | return _bootstrap._gcd_import(name[level:], package, level) |
| 73 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import |
| 74 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load |
| 75 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked |
| 76 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked |
| 77 | File "<frozen importlib._bootstrap_external>", line 848, in exec_module |
| 78 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed |
| 79 | File "/Python/django/tests/dbshell/test_postgresql.py", line 13, in <module> |
| 80 | class PostgreSqlDbshellCommandTestCase(SimpleTestCase): |
| 81 | File "/Python/django/tests/dbshell/test_postgresql.py", line 140, in PostgreSqlDbshellCommandTestCase |
| 82 | @skipUnless(connection.vendor == 'postgresql', 'Requires a PostgreSQL connection') |
| 83 | File "/Python/django/django/utils/connection.py", line 15, in __getattr__ |
| 84 | return getattr(self._connections[self._alias], item) |
| 85 | File "/Python/django/django/utils/connection.py", line 60, in __getitem__ |
| 86 | if alias not in self.settings: |
| 87 | File "/Python/django/django/utils/functional.py", line 56, in __get__ |
| 88 | res = instance.__dict__[self.name] = self.func(instance) |
| 89 | File "/Python/django/django/utils/connection.py", line 45, in settings |
| 90 | self._settings = self.configure_settings(self._settings) |
| 91 | File "/Python/django/django/db/utils.py", line 144, in configure_settings |
| 92 | databases = super().configure_settings(databases) |
| 93 | File "/Python/django/django/utils/connection.py", line 50, in configure_settings |
| 94 | settings = getattr(django_settings, self.settings_name) |
| 95 | File "/Python/django/django/conf/__init__.py", line 89, in __getattr__ |
| 96 | self._setup(name) |
| 97 | File "/Python/django/django/conf/__init__.py", line 76, in _setup |
| 98 | self._wrapped = Settings(settings_module) |
| 99 | File "/Python/django/django/conf/__init__.py", line 204, in __init__ |
| 100 | warnings.warn( |
| 101 | django.utils.deprecation.RemovedInDjango50Warning: The default value of USE_TZ will change from False to True in Django 5.0. Set USE_TZ to False in your project settings if you want to keep the current default behavior. |
| 102 | }}} |