accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance

First seen 1 year, 9 months ago in commit 1cd3a pushed by Anže Pečar

Last 100 Runs
Pass % 98.0%
p50 duration 0.6847s
p95 duration 0.7619s

36 runs 34 passed 2 failed in the last 30 days

Run 2 weeks, 5 days ago
Status PASS
Commit

Fix warnings

Commit 7d76e pushed by Anže Pečar
Stdout
Done 🎉
Run 2 weeks, 5 days ago
Status FAIL
Commit

One more exception

Commit 967da pushed by Anže Pečar
Repr
self = <accounts.tests.TestSelectedInstance testMethod=test_invalid_selected_instance>

    def test_invalid_selected_instance(self):
>       response = self.client.get("/?selected_instance=invalid")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

accounts/tests.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.13/site-packages/django/test/client.py:1124: in get
    response = super().get(
.venv/lib/python3.13/site-packages/django/test/client.py:475: in get
    return self.generic(
.venv/lib/python3.13/site-packages/django/test/client.py:671: in generic
    return self.request(**r)
           ^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/django/test/client.py:1087: in request
    self.check_exception(response)
.venv/lib/python3.13/site-packages/django/test/client.py:802: in check_exception
    raise exc_value
.venv/lib/python3.13/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
accounts/views.py:281: in index
    account_access = request.user.accountaccess.account
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f60d43b8590>>
args = ('accountaccess',)
_wrapped = <django.contrib.auth.models.AnonymousUser object at 0x7f60d43b8590>

    def inner(self, *args):
        if (_wrapped := self._wrapped) is empty:
            self._setup()
            _wrapped = self._wrapped
>       return func(_wrapped, *args)
               ^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'AnonymousUser' object has no attribute 'accountaccess'

.venv/lib/python3.13/site-packages/django/utils/functional.py:253: AttributeError
Stdout
Done 🎉
Run 2 weeks, 5 days ago
Status FAIL
Commit

Fix account access edge cases

Commit 745a8 pushed by Anže Pečar
Repr
self = <accounts.tests.TestSelectedInstance testMethod=test_invalid_selected_instance>

    def test_invalid_selected_instance(self):
>       response = self.client.get("/?selected_instance=invalid")
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

accounts/tests.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv/lib/python3.13/site-packages/django/test/client.py:1124: in get
    response = super().get(
.venv/lib/python3.13/site-packages/django/test/client.py:475: in get
    return self.generic(
.venv/lib/python3.13/site-packages/django/test/client.py:671: in generic
    return self.request(**r)
           ^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/django/test/client.py:1087: in request
    self.check_exception(response)
.venv/lib/python3.13/site-packages/django/test/client.py:802: in check_exception
    raise exc_value
.venv/lib/python3.13/site-packages/django/core/handlers/exception.py:55: in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
.venv/lib/python3.13/site-packages/django/core/handlers/base.py:197: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
accounts/views.py:281: in index
    account_access = request.user.accountaccess.account
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7fb40778da90>>
args = ('accountaccess',)
_wrapped = <django.contrib.auth.models.AnonymousUser object at 0x7fb40778da90>

    def inner(self, *args):
        if (_wrapped := self._wrapped) is empty:
            self._setup()
            _wrapped = self._wrapped
>       return func(_wrapped, *args)
               ^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'AnonymousUser' object has no attribute 'accountaccess'

.venv/lib/python3.13/site-packages/django/utils/functional.py:253: AttributeError
Stdout
Done 🎉
Run 2 weeks, 5 days ago
Status PASS
Commit

Change logging level to error

Commit 778b8 pushed by Anže Pečar
Stdout
Done 🎉
Run 2 weeks, 6 days ago
Status PASS
Commit

More warning cleanup

Commit c672f pushed by Anže Pečar
Stdout
Done 🎉
Run 2 weeks, 6 days ago
Status PASS
Commit

Upgrade dependencies (#191)

Commit 4f01f pushed by Anže Pečar
Stdout
Done 🎉
Run 2 weeks, 6 days ago
Status PASS
Commit

Merge 78304ffdf594fa48ef26907556b193a144fbdf26 into 57a6204982c48933f681bc5951a02ee510543996

Commit f462c pushed by Anže Pečar
Stdout
Done 🎉
Run 3 weeks, 3 days ago
Status PASS
Commit

Upgrade dependencies (#189)

Commit 57a62 pushed by Anže Pečar
Stdout
Done 🎉
Run 3 weeks, 3 days ago
Status PASS
Commit

Update pre-commit hook astral-sh/ruff-pre-commit to v0.12.9 (#190)

Commit b1717 pushed by renovate[bot]
Stdout
Done 🎉
Run 3 weeks, 4 days ago
Status PASS
Commit

Merge da0a95585a594edb412975d04739d4fad8d7315e into 21005ddd99faf61c5027480920c85e13a8ed6c25

Commit c87d8 pushed by renovate[bot]
Stdout
Done 🎉
Run 3 weeks, 5 days ago
Status PASS
Commit

Merge 7cd825219bc2efe41ec615134e915c6d72bf69ed into 21005ddd99faf61c5027480920c85e13a8ed6c25

Commit 3d7c9 pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Update pre-commit dependencies (#188)

Commit 21005 pushed by renovate[bot]
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Update all dependencies (#187)

Commit 3a385 pushed by renovate[bot]
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Merge ed387236b390cdf83cde523e6347e1db581ccd81 into a052ad8e84b7d03524b23df5d5ab7b4b0e81765f

Commit 18a35 pushed by renovate[bot]
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Merge b9efd6026178ea3c625392818c6bcf3c035d4cf5 into a052ad8e84b7d03524b23df5d5ab7b4b0e81765f

Commit 77523 pushed by renovate[bot]
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Looking at the stats the timeout could be even lower

Commit a052a pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Decrease request timeout

Commit 7fed3 pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Upgrade dependencies (#186)

Commit 7fb39 pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Use starter pack splash images in metadata (OpenGraph and APIs) (#185)

Commit 6d003 pushed by Julian Fietkau
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Merge 47a79a9b05305ba3b56efb8b5688fca09eccc51e into 35daba3521d938f19924d7c908ca5690c5871ae6

Commit 33b86 pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Add update splash images to scheduler

Commit 35dab pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Fix type

Commit b1213 pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month ago
Status PASS
Commit

Add splash image rendering with admin and backend functions (#184)

Commit af950 pushed by Julian Fietkau
Stdout
Done 🎉
Run 1 month, 1 week ago
Status PASS
Commit

Add media as an nginx location and disable autoindex

Commit 8b40b pushed by Anže Pečar
Stdout
Done 🎉
Run 1 month, 1 week ago
Status PASS
Commit

Upgrade dependencies (#181)

Commit 41864 pushed by Anže Pečar
Stdout
Done 🎉