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

MastodonAuthCallbackTests::test_token_exchange_failure_without_token_errors

First seen 4 months, 2 weeks ago in fcb1b79
CI github-actions:test 11 runs
Average
102 ms
median 94 ms
max 202 ms
Phases
Setup 1 ms Call 100 ms Teardown 0.39 ms
Categories
Database 7 ms Other (Mocking, Cache, pytest, Unsampled, ...) 95 ms

8 database queries per run

Needs 680 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call99 ms98.6%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:606 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})83 ms82.5%
Client.getdjango/test/client.py:113383 ms82.5%
RequestFactory.getdjango/test/client.py:47583 ms82.5%
RequestFactory.genericdjango/test/client.py:67183 ms82.5%
Client.requestdjango/test/client.py:109183 ms82.5%
ClientHandler.__call__django/test/client.py:17370 ms69.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6370 ms69.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10470 ms69.9%
WhiteNoise.add_fileswhitenoise/base.py:10870 ms69.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12052 ms52.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13151 ms50.2%
WhiteNoise.get_static_filewhitenoise/base.py:21229 ms28.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:23327 ms26.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:17627 ms26.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:19727 ms26.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:2027 ms26.9%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:23527 ms26.9%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:21423 ms23.3%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:59523 ms23.3%
unquote<stdlib>/urllib/parse.py:85023 ms23.3%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms1.8%
WhiteNoise.add_cache_headerswhitenoise/base.py:2362 ms1.8%
WhiteNoise.get_static_filewhitenoise/base.py:21720 ms19.7%
StaticFile.__init__whitenoise/responders.py:739 ms9.0%
StaticFile.get_headerswhitenoise/responders.py:1677 ms7.2%
__init____init__:-17 ms7.2%
Headers.__init__<stdlib>/wsgiref/headers.py:427 ms7.2%
StaticFile.get_headerswhitenoise/responders.py:1762 ms1.8%
StaticFile.__init__whitenoise/responders.py:725 ms5.4%
StaticFile.get_file_statswhitenoise/responders.py:1615 ms5.4%
StaticFile.__init__whitenoise/responders.py:775 ms5.4%
StaticFile.get_alternativeswhitenoise/responders.py:2064 ms3.6%
compile<stdlib>/re/__init__.py:2914 ms3.6%
_compile<stdlib>/re/__init__.py:3344 ms3.6%
StaticFile.get_alternativeswhitenoise/responders.py:2082 ms1.8%
WhiteNoise.get_static_filewhitenoise/base.py:2112 ms1.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1232 ms1.8%
WhiteNoise.is_compressed_variantwhitenoise/base.py:2032 ms1.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11518 ms17.9%
scantreewhitenoise/base.py:27118 ms17.9%
scantreewhitenoise/base.py:27116 ms16.1%
scantreewhitenoise/base.py:2737 ms7.2%
scantreewhitenoise/base.py:2715 ms5.4%
scantreewhitenoise/base.py:2715 ms5.4%
scantreewhitenoise/base.py:2714 ms3.6%
scantreewhitenoise/base.py:2734 ms3.6%
scantreewhitenoise/base.py:2692 ms1.8%
scantreewhitenoise/base.py:2694 ms3.6%
scantreewhitenoise/base.py:2732 ms1.8%
ClientHandler.__call__django/test/client.py:18611 ms10.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14211 ms10.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5611 ms10.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38011 ms10.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5611 ms10.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1239 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1459 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms9.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms9.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms7.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms7.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms7.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms7.2%
BaseHandler._get_responsedjango/core/handlers/base.py:1997 ms7.2%
authmastodon_auth/views.py:303 logger.exception("login log_in api error for %s", instance.url)7 ms7.2%
Logger.exception<stdlib>/logging/__init__.py:15637 ms7.2%
Logger.error<stdlib>/logging/__init__.py:15577 ms7.2%
Logger._log<stdlib>/logging/__init__.py:16737 ms7.2%
Logger.handle<stdlib>/logging/__init__.py:16897 ms7.2%
Logger.callHandlers<stdlib>/logging/__init__.py:17497 ms7.2%
Handler.handle<stdlib>/logging/__init__.py:10307 ms7.2%
StreamHandler.emit<stdlib>/logging/__init__.py:11545 ms5.4%
Handler.format<stdlib>/logging/__init__.py:10025 ms5.4%
Formatter.format<stdlib>/logging/__init__.py:7205 ms5.4%
Formatter.formatException<stdlib>/logging/__init__.py:6705 ms5.4%
print_exception<stdlib>/traceback.py:1754 ms3.6%
TracebackException.print<stdlib>/traceback.py:17244 ms3.6%
TracebackException.format<stdlib>/traceback.py:16602 ms1.8%
StackSummary.format<stdlib>/traceback.py:8112 ms1.8%
StackSummary.format_frame_summary<stdlib>/traceback.py:6452 ms1.8%
StackSummary._should_show_carets<stdlib>/traceback.py:7622 ms1.8%
parse<stdlib>/ast.py:462 ms1.8%
print_exception<stdlib>/traceback.py:1742 ms1.8%
TracebackException.__init__<stdlib>/traceback.py:11482 ms1.8%
StackSummary._extract_from_extended_frame_gen<stdlib>/traceback.py:5482 ms1.8%
checkcache<frozen linecache>:782 ms1.8%
FileHandler.emit<stdlib>/logging/__init__.py:12732 ms1.8%
StreamHandler.emit<stdlib>/logging/__init__.py:11582 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3822 ms1.8%
MessageMiddleware.process_responsedjango/contrib/messages/middleware.py:232 ms1.8%
BaseStorage.updatedjango/contrib/messages/storage/base.py:1402 ms1.8%
FallbackStorage._storedjango/contrib/messages/storage/fallback.py:502 ms1.8%
CookieStorage._storedjango/contrib/messages/storage/cookie.py:1412 ms1.8%
CookieStorage._encode_partsdjango/contrib/messages/storage/cookie.py:1842 ms1.8%
Signer.sign_objectdjango/core/signing.py:2722 ms1.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3822 ms1.8%
CSPMiddleware.process_responsecsp/middleware.py:832 ms1.8%
asdict<stdlib>/dataclasses.py:15172 ms1.8%
ClientHandler.__call__django/test/client.py:2062 ms1.8%
Signal.disconnectdjango/dispatch/dispatcher.py:2082 ms1.8%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()5 ms5.4%
TestCase._fixture_setupdjango/test/testcases.py:14815 ms5.4%
TestCase._enter_atomicsdjango/test/testcases.py:13995 ms5.4%
Atomic.__enter__django/db/transaction.py:2235 ms5.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:265 ms5.4%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4005 ms5.4%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3675 ms5.4%
CursorWrapper.executedjango/db/backends/utils.py:795 ms5.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms5.4%
CursorWrapper._executedjango/db/backends/utils.py:1035 ms5.4%
Cursor.executepsycopg/cursor.py:1135 ms5.4%
Connection.waitpsycopg/connection.py:4955 ms5.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms5.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms5.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms5.4%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:599 cache.set(f"oauth:{state}", instance.id)4 ms3.6%
FileBasedCache.setdjango/core/cache/backends/filebased.py:492 ms1.8%
FileBasedCache._createdirdjango/core/cache/backends/filebased.py:1242 ms1.8%
safe_makedirsdjango/utils/_os.py:622 ms1.8%
makedirsdjango/utils/_os.py:562 ms1.8%
FileBasedCache.setdjango/core/cache/backends/filebased.py:572 ms1.8%
file_move_safedjango/core/files/move.py:422 ms1.8%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:609 self.assertFalse(AccountAccess.objects.exists())4 ms3.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms3.6%
QuerySet.existsdjango/db/models/query.py:14584 ms3.6%
Query.has_resultsdjango/db/models/sql/query.py:6874 ms3.6%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15934 ms3.6%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms1.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7682 ms1.8%
/home/runner/work/fedidevs/fedidevs/.venv/lib/python3.15/site-packages/django/db/models/sql/compiler.py钷�罦醴�罦:-12 ms1.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.8%
Cursor.executepsycopg/cursor.py:1132 ms1.8%
Connection.waitpsycopg/connection.py:4952 ms1.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.8%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:592 instance = Instance.objects.create(2 ms1.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.8%
QuerySet.createdjango/db/models/query.py:7362 ms1.8%
Model.savedjango/db/models/base.py:9042 ms1.8%
Model.save_basedjango/db/models/base.py:9962 ms1.8%
Model._save_tabledjango/db/models/base.py:11992 ms1.8%
Model._do_insertdjango/db/models/base.py:12512 ms1.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.8%
QuerySet._insertdjango/db/models/query.py:21412 ms1.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms1.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms1.8%
Cursor.executepsycopg/cursor.py:1132 ms1.8%
Connection.waitpsycopg/connection.py:4952 ms1.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms1.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms1.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms1.8%
Estimated from 55 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:606
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Mocking
76 ms
mastodon_auth/views.py:303
logger.exception("login log_in api error for %s", instance.url)
auth · Mocking
7 ms
mastodon_auth/tests.py:599
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Cache
4 ms
mastodon_auth/tests.py:609
self.assertFalse(AccountAccess.objects.exists())
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Database
4 ms
mastodon_auth/tests.py:592
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Database
2 ms

Fixtures

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

Database

8 queries · 5 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:606
92 ms
call _pre_setup
django/test/testcases.py:1167
5 ms
call pytest internals 2 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 101 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 51 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 105 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 80 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 60 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 94 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 72 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 54 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 121 ms 82997f8 main Profile
3 weeks ago CI github-actions:test passed 180 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 202 ms ab6465a main Profile
3 weeks ago CI github-actions:test passed 76 ms 0c23747 main Run