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

MastodonAuthCallbackTests::test_token_exchange_failure_without_token_errors

First seen 3 months, 4 weeks ago in fcb1b79
CI github-actions:test 4 runs
Average
139 ms
median 151 ms
max 202 ms
Phases
Setup 1 ms Call 137 ms Teardown 0.55 ms
Categories
Database 7 ms Other (Mocking, pytest, Libraries, Cache, ...) 132 ms

8 database queries per run

Needs 1 MB 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
call53 ms98.2%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:520 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})46 ms85.4%
Client.getdjango/test/client.py:113346 ms85.4%
RequestFactory.getdjango/test/client.py:47546 ms85.4%
RequestFactory.genericdjango/test/client.py:67146 ms85.4%
Client.requestdjango/test/client.py:109146 ms85.4%
ClientHandler.__call__django/test/client.py:17344 ms81.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6344 ms81.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10444 ms81.1%
WhiteNoise.add_fileswhitenoise/base.py:10844 ms81.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12032 ms59.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13128 ms51.2%
WhiteNoise.get_static_filewhitenoise/base.py:21723 ms42.7%
StaticFile.__init__whitenoise/responders.py:7312 ms21.3%
StaticFile.get_headerswhitenoise/responders.py:1765 ms8.5%
Headers.__setitem__<stdlib>/wsgiref/headers.py:625 ms8.5%
Headers.__delitem__<stdlib>/wsgiref/headers.py:722 ms4.3%
StaticFile.get_headerswhitenoise/responders.py:1782 ms4.3%
StaticFile.get_headerswhitenoise/responders.py:1712 ms4.3%
Headers.__contains__<stdlib>/wsgiref/headers.py:872 ms4.3%
Headers.get<stdlib>/wsgiref/headers.py:1052 ms4.3%
StaticFile.get_headerswhitenoise/responders.py:1702 ms4.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:632 ms4.3%
StaticFile.__init__whitenoise/responders.py:745 ms8.5%
parsedate<stdlib>/email/_parseaddr.py:1862 ms4.3%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.3%
StaticFile.__init__whitenoise/responders.py:775 ms8.5%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms4.3%
__init____init__:-12 ms4.3%
Headers.__init__<stdlib>/wsgiref/headers.py:442 ms4.3%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms4.3%
StaticFile.get_alternativeswhitenoise/responders.py:1982 ms4.3%
StaticFile.get_alternatives.<locals>.<lambda>whitenoise/responders.py:1982 ms4.3%
<GC>~2 ms4.3%
StaticFile.__init__whitenoise/responders.py:722 ms4.3%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms4.3%
__init____init__:-12 ms4.3%
WhiteNoise.get_static_filewhitenoise/base.py:2125 ms8.5%
WhiteNoise.add_cache_headerswhitenoise/base.py:2335 ms8.5%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms8.5%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms8.5%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms8.5%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2355 ms8.5%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms4.3%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2072 ms4.3%
urljoin<stdlib>/urllib/parse.py:7432 ms4.3%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2142 ms4.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1322 ms4.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1159 ms17.1%
scantreewhitenoise/base.py:2717 ms12.8%
scantreewhitenoise/base.py:2717 ms12.8%
scantreewhitenoise/base.py:2735 ms8.5%
scantreewhitenoise/base.py:2712 ms4.3%
scantreewhitenoise/base.py:2712 ms4.3%
scantreewhitenoise/base.py:2732 ms4.3%
scantreewhitenoise/base.py:2732 ms4.3%
ClientHandler.__call__django/test/client.py:1862 ms4.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1422 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1452 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1992 ms4.3%
authmastodon_auth/views.py:304 logger.exception("login log_in api error for %s", instance.url)2 ms4.3%
Logger.exception<stdlib>/logging/__init__.py:15582 ms4.3%
Logger.error<stdlib>/logging/__init__.py:15522 ms4.3%
Logger._log<stdlib>/logging/__init__.py:16682 ms4.3%
Logger.handle<stdlib>/logging/__init__.py:16842 ms4.3%
Logger.callHandlers<stdlib>/logging/__init__.py:17442 ms4.3%
Handler.handle<stdlib>/logging/__init__.py:10302 ms4.3%
StreamHandler.emit<stdlib>/logging/__init__.py:11542 ms4.3%
Handler.format<stdlib>/logging/__init__.py:10022 ms4.3%
Formatter.format<stdlib>/logging/__init__.py:7202 ms4.3%
Formatter.formatException<stdlib>/logging/__init__.py:6702 ms4.3%
print_exception<stdlib>/traceback.py:1742 ms4.3%
TracebackException.__init__<stdlib>/traceback.py:11482 ms4.3%
StackSummary._extract_from_extended_frame_gen<stdlib>/traceback.py:5292 ms4.3%
_walk_tb_with_full_positions<stdlib>/traceback.py:4612 ms4.3%
_get_code_position<stdlib>/traceback.py:4752 ms4.3%
SysMonitor.sysmon_py_startcoverage/sysmon.py:348 tracing_code = disp.trace2 ms4.3%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:506 instance = Instance.objects.create(2 ms4.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.3%
QuerySet.createdjango/db/models/query.py:7362 ms4.3%
Model.savedjango/db/models/base.py:9042 ms4.3%
Model.save_basedjango/db/models/base.py:9962 ms4.3%
Model._save_tabledjango/db/models/base.py:11992 ms4.3%
Model._do_insertdjango/db/models/base.py:12512 ms4.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.3%
QuerySet._insertdjango/db/models/query.py:21412 ms4.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms4.3%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.3%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.3%
Cursor.executepsycopg/cursor.py:1132 ms4.3%
Connection.waitpsycopg/connection.py:4952 ms4.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.3%
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errorsmastodon_auth/tests.py:513 cache.set(f"oauth:{state}", instance.id)2 ms4.3%
FileBasedCache.setdjango/core/cache/backends/filebased.py:572 ms4.3%
file_move_safedjango/core/files/move.py:422 ms4.3%
Estimated from 23 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:520
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Mocking
44 ms
mastodon_auth/tests.py:506
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Database
2 ms
mastodon_auth/tests.py:513
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_token_exchange_failure_without_token_errors · Cache
2 ms
mastodon_auth/views.py:304
logger.exception("login log_in api error for %s", instance.url)
auth · Mocking
2 ms

Fixtures

Exact setup time
_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_clear_site_cache function 0.03 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.02 ms
monkeypatch function 0.02 ms

Database

8 queries · 2 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:520
51 ms
call sysmon_py_start
coverage/sysmon.py:348
2 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 18 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 54 ms d923a46 main Profile
7 hours ago CI github-actions:test passed 121 ms 82997f8 main Profile
7 hours ago CI github-actions:test passed 180 ms 623aa3e main Profile
12 hours ago CI github-actions:test passed 202 ms ab6465a main Profile
12 hours ago CI github-actions:test passed 76 ms 0c23747 main Run
3 months, 3 weeks ago CI github-actions passed 52 ms 69d78ea HEAD Run
3 months, 3 weeks ago CI github-actions passed 73 ms 8fac7b5 main Run
3 months, 3 weeks ago CI github-actions passed 69 ms 36b9579 main Run
3 months, 3 weeks ago CI github-actions passed 120 ms 553d048 main Run
3 months, 3 weeks ago CI github-actions passed 71 ms 8eb0f44 HEAD Run
3 months, 3 weeks ago CI github-actions passed 82 ms e0fb3ac HEAD Run
3 months, 3 weeks ago CI github-actions passed 68 ms a849b58 HEAD Run
3 months, 3 weeks ago CI github-actions passed 78 ms 6418e05 HEAD Run
3 months, 3 weeks ago CI github-actions passed 89 ms 5b9b309 main Run
3 months, 4 weeks ago CI github-actions passed 201 ms 1f2c5a6 main Run
3 months, 4 weeks ago CI github-actions passed 83 ms 5ec7fa8 main Run
3 months, 4 weeks ago CI github-actions passed 84 ms 1e42064 main Run
3 months, 4 weeks ago CI github-actions passed 78 ms fcb1b79 main Run