@pytest.fixture
def regular_user():
> return User.objects.create_user(username="johndoe", password="")
.tox/py3/lib/python3.7/site-packages/swh/web/tests/conftest.py:1211:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/django/contrib/auth/models.py:151: in create_user
return self._create_user(username, email, password, **extra_fields)
.tox/py3/lib/python3.7/site-packages/django/contrib/auth/models.py:145: in _create_user
user.save(using=self._db)
.tox/py3/lib/python3.7/site-packages/django/contrib/auth/base_user.py:66: in save
super().save(*args, **kwargs)
.tox/py3/lib/python3.7/site-packages/django/db/models/base.py:744: in save
force_update=force_update, update_fields=update_fields)
.tox/py3/lib/python3.7/site-packages/django/db/models/base.py:782: in save_base
force_update, using, update_fields,
.tox/py3/lib/python3.7/site-packages/django/db/models/base.py:873: in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
.tox/py3/lib/python3.7/site-packages/django/db/models/base.py:911: in _do_insert
using=using, raw=raw)
.tox/py3/lib/python3.7/site-packages/django/db/models/manager.py:82: in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
.tox/py3/lib/python3.7/site-packages/django/db/models/query.py:1186: in _insert
return query.get_compiler(using=using).execute_sql(return_id)
.tox/py3/lib/python3.7/site-packages/django/db/models/sql/compiler.py:1375: in execute_sql
with self.connection.cursor() as cursor:
.tox/py3/lib/python3.7/site-packages/django/db/backends/base/base.py:256: in cursor
return self._cursor()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7fe738388358>
name = None
def _cursor(self, name=None):
> self.ensure_connection()
E RuntimeError: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
.tox/py3/lib/python3.7/site-packages/django/db/backends/base/base.py:233: RuntimeError
TEST RESULT
TEST RESULT
- Run At
- Mar 9 2022, 6:25 PM