flakytest.dev anze3db fedidevs
Tests / mastodon_auth/tests.py

MastodonAuthCallbackTests::test_invalid_grant_is_logged_as_warning_not_error

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
123 ms
median 111 ms
max 258 ms
Phases
Setup 1 ms Call 121 ms Teardown 0.40 ms
Categories
Database 7 ms Other (Mocking, Cache, Imports, pytest, ...) 116 ms

8 database queries per run

Needs 106 KB of memory (max 692 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call62 ms98.3%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:632 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})37 ms59.0%
Client.getdjango/test/client.py:113337 ms59.0%
RequestFactory.getdjango/test/client.py:47537 ms59.0%
RequestFactory.genericdjango/test/client.py:67137 ms59.0%
Client.requestdjango/test/client.py:109137 ms59.0%
ClientHandler.__call__django/test/client.py:17337 ms59.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6337 ms59.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10437 ms59.0%
WhiteNoise.add_fileswhitenoise/base.py:10837 ms59.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11525 ms39.3%
scantreewhitenoise/base.py:27125 ms39.3%
scantreewhitenoise/base.py:27119 ms29.5%
scantreewhitenoise/base.py:27312 ms19.7%
scantreewhitenoise/base.py:2696 ms9.8%
scantreewhitenoise/base.py:2736 ms9.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12012 ms19.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms19.7%
WhiteNoise.get_static_filewhitenoise/base.py:21712 ms19.7%
StaticFile.__init__whitenoise/responders.py:736 ms9.8%
StaticFile.get_headerswhitenoise/responders.py:1676 ms9.8%
StaticFile.__init__whitenoise/responders.py:766 ms9.8%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:631 with self.assertLogs("mastodon_auth.views", level="WARNING") as logs:12 ms19.7%
_find_and_load<frozen importlib._bootstrap>:135312 ms19.7%
_find_and_load_unlocked<frozen importlib._bootstrap>:12386 ms9.8%
_find_spec<frozen importlib._bootstrap>:11646 ms9.8%
PurePath.name<stdlib>/pathlib/__init__.py:4046 ms9.8%
PurePath._tail<stdlib>/pathlib/__init__.py:3676 ms9.8%
PurePath._raw_path<stdlib>/pathlib/__init__.py:3336 ms9.8%
<GC>~6 ms9.8%
_find_and_load_unlocked<frozen importlib._bootstrap>:12496 ms9.8%
_load_unlocked<frozen importlib._bootstrap>:8576 ms9.8%
_LoaderBasics.exec_module<frozen importlib._bootstrap_external>:7476 ms9.8%
SourceLoader.get_code<frozen importlib._bootstrap_external>:8816 ms9.8%
SourceLoader.source_to_code<frozen importlib._bootstrap_external>:8106 ms9.8%
_call_with_frames_removed<frozen importlib._bootstrap>:4916 ms9.8%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()6 ms9.8%
TestCase._fixture_setupdjango/test/testcases.py:14816 ms9.8%
TestCase._enter_atomicsdjango/test/testcases.py:13996 ms9.8%
Atomic.__enter__django/db/transaction.py:2236 ms9.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms9.8%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4006 ms9.8%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3676 ms9.8%
CursorWrapper.executedjango/db/backends/utils.py:796 ms9.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms9.8%
CursorWrapper._executedjango/db/backends/utils.py:1036 ms9.8%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:615 instance = Instance.objects.create(6 ms9.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:876 ms9.8%
QuerySet.createdjango/db/models/query.py:7366 ms9.8%
Model.savedjango/db/models/base.py:9046 ms9.8%
Model.save_basedjango/db/models/base.py:9966 ms9.8%
Model._save_tabledjango/db/models/base.py:11996 ms9.8%
Model._do_insertdjango/db/models/base.py:12516 ms9.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:876 ms9.8%
QuerySet._insertdjango/db/models/query.py:21416 ms9.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19366 ms9.8%
CursorWrapper.executedjango/db/backends/utils.py:796 ms9.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms9.8%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms9.8%
Cursor.executepsycopg/cursor.py:1136 ms9.8%
Connection.waitpsycopg/connection.py:4956 ms9.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2066 ms9.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2866 ms9.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:786 ms9.8%
Estimated from 10 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:632
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error · Mocking
37 ms
mastodon_auth/tests.py:631
with self.assertLogs("mastodon_auth.views", level="WARNING") as logs:
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error · Imports
12 ms
mastodon_auth/tests.py:615
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error · Database
6 ms

Fixtures

Exact setup time
_live_server_helper function 0.12 ms
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

8 queries · 5 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:632
56 ms
call _pre_setup
django/test/testcases.py:1167
6 ms

Reliability

14 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 14 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 63 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 258 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 72 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 44 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 111 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 108 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 119 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 77 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 70 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 146 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 169 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 182 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 183 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 134 ms 0c23747 main Run