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

MastodonAuthCallbackTests::test_token_response_without_scope_still_logs_in

First seen 14 hours ago in 0c23747
CI github-actions:test 4 runs
Average
176 ms
median 205 ms
max 221 ms
Phases
Setup 2 ms Call 174 ms Teardown 0.30 ms
Categories
Database 26 ms Other (Mocking, Cache, Unsampled, Libraries) 150 ms

33 database queries per run

Needs 268 KB of memory (max 316 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 8 hours ago · open run
Show pytest frames
call73 ms98.7%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:374 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})70 ms94.4%
Client.getdjango/test/client.py:113370 ms94.4%
RequestFactory.getdjango/test/client.py:47570 ms94.4%
RequestFactory.genericdjango/test/client.py:67170 ms94.4%
Client.requestdjango/test/client.py:109170 ms94.4%
ClientHandler.__call__django/test/client.py:17353 ms70.8%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6353 ms70.8%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10453 ms70.8%
WhiteNoise.add_fileswhitenoise/base.py:10853 ms70.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12035 ms47.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13134 ms45.0%
WhiteNoise.get_static_filewhitenoise/base.py:21718 ms23.6%
StaticFile.__init__whitenoise/responders.py:7310 ms12.9%
StaticFile.get_headerswhitenoise/responders.py:1765 ms6.4%
Headers.__setitem__<stdlib>/wsgiref/headers.py:642 ms2.1%
StaticFile.get_headerswhitenoise/responders.py:1812 ms2.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:642 ms2.1%
StaticFile.get_headerswhitenoise/responders.py:1802 ms2.1%
StaticFile.__init__whitenoise/responders.py:722 ms2.1%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms2.1%
__init____init__:-12 ms2.1%
FileEntry.__init__whitenoise/responders.py:2632 ms2.1%
FileEntry.stat_regular_filewhitenoise/responders.py:2762 ms2.1%
StaticFile.__init__whitenoise/responders.py:772 ms2.1%
StaticFile.get_alternativeswhitenoise/responders.py:1982 ms2.1%
StaticFile.get_alternatives.<locals>.<lambda>whitenoise/responders.py:1982 ms2.1%
<GC>~2 ms2.1%
StaticFile.__init__whitenoise/responders.py:762 ms2.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms2.1%
StaticFile.__init__whitenoise/responders.py:742 ms2.1%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms2.1%
Headers.get<stdlib>/wsgiref/headers.py:1042 ms2.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:21214 ms19.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:23310 ms12.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1768 ms10.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1978 ms10.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:206 ms8.6%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2353 ms4.3%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2083 ms4.3%
urlsplit<stdlib>/urllib/parse.py:5822 ms2.1%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1732 ms2.1%
WhiteNoiseMiddleware.get_name_without_hashwhitenoise/middleware.py:1912 ms2.1%
splitext<frozen posixpath>:1262 ms2.1%
_splitext<frozen genericpath>:1792 ms2.1%
WhiteNoise.add_cache_headerswhitenoise/base.py:2342 ms2.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:642 ms2.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:492 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:2142 ms2.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:622 ms2.1%
Headers.__delitem__<stdlib>/wsgiref/headers.py:722 ms2.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1232 ms2.1%
WhiteNoise.is_compressed_variantwhitenoise/base.py:2032 ms2.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11518 ms23.6%
scantreewhitenoise/base.py:27116 ms21.5%
scantreewhitenoise/base.py:27310 ms12.9%
<GC>~10 ms12.9%
scantreewhitenoise/base.py:2715 ms6.4%
scantreewhitenoise/base.py:2733 ms4.3%
scantreewhitenoise/base.py:2712 ms2.1%
scantreewhitenoise/base.py:2712 ms2.1%
scantreewhitenoise/base.py:2712 ms2.1%
scantreewhitenoise/base.py:2732 ms2.1%
scantreewhitenoise/base.py:2692 ms2.1%
ClientHandler.__call__django/test/client.py:18616 ms21.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14216 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12316 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14516 ms21.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms21.5%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.3%
BaseHandler._get_responsedjango/core/handlers/base.py:19914 ms19.3%
authmastodon_auth/views.py:334 account, __ = Account.objects.update_or_create(6 ms8.6%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:876 ms8.6%
QuerySet.update_or_createdjango/db/models/query.py:10966 ms8.6%
QuerySet.get_or_createdjango/db/models/query.py:10543 ms4.3%
QuerySet.getdjango/db/models/query.py:7023 ms4.3%
QuerySet.__len__django/db/models/query.py:4213 ms4.3%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms4.3%
ModelIterable.__iter__django/db/models/query.py:1033 ms4.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms4.3%
CursorWrapper.executedjango/db/backends/utils.py:793 ms4.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms4.3%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms4.3%
Cursor.executepsycopg/cursor.py:1133 ms4.3%
Connection.waitpsycopg/connection.py:4953 ms4.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms4.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms4.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms4.3%
QuerySet.get_or_createdjango/db/models/query.py:10612 ms2.1%
QuerySet.createdjango/db/models/query.py:7362 ms2.1%
Model.savedjango/db/models/base.py:9042 ms2.1%
Model.save_basedjango/db/models/base.py:9962 ms2.1%
Model._save_tabledjango/db/models/base.py:11992 ms2.1%
Model._do_insertdjango/db/models/base.py:12512 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.1%
QuerySet._insertdjango/db/models/query.py:21412 ms2.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.1%
Cursor.executepsycopg/cursor.py:1132 ms2.1%
Connection.waitpsycopg/connection.py:4952 ms2.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.1%
QuerySet.get_or_createdjango/db/models/query.py:10592 ms2.1%
Atomic.__exit__django/db/transaction.py:2592 ms2.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms2.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.1%
authmastodon_auth/views.py:370 AccountAccess.objects.update_or_create(3 ms4.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms4.3%
QuerySet.update_or_createdjango/db/models/query.py:10963 ms4.3%
QuerySet.get_or_createdjango/db/models/query.py:10612 ms2.1%
QuerySet.createdjango/db/models/query.py:7362 ms2.1%
Model.savedjango/db/models/base.py:9042 ms2.1%
Model.save_basedjango/db/models/base.py:9962 ms2.1%
Model._save_tabledjango/db/models/base.py:11992 ms2.1%
Model._do_insertdjango/db/models/base.py:12512 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.1%
QuerySet._insertdjango/db/models/query.py:21412 ms2.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.1%
Cursor.executepsycopg/cursor.py:1132 ms2.1%
Connection.waitpsycopg/connection.py:4952 ms2.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.1%
QuerySet.get_or_createdjango/db/models/query.py:10592 ms2.1%
Atomic.__exit__django/db/transaction.py:2592 ms2.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms2.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.1%
Cursor.executepsycopg/cursor.py:1132 ms2.1%
Connection.waitpsycopg/connection.py:4952 ms2.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.1%
authmastodon_auth/views.py:379 auth_login(request, user, backend=settings.AUTHENTICATION_BACKENDS[0])3 ms4.3%
logindjango/contrib/auth/__init__.py:1892 ms2.1%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms2.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms2.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1232 ms2.1%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1022 ms2.1%
SessionBase.encodedjango/contrib/sessions/backends/base.py:1292 ms2.1%
logindjango/contrib/auth/__init__.py:1982 ms2.1%
Signal.senddjango/dispatch/dispatcher.py:2492 ms2.1%
update_last_logindjango/contrib/auth/models.py:242 ms2.1%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms2.1%
Model.savedjango/db/models/base.py:9042 ms2.1%
Model.save_basedjango/db/models/base.py:9962 ms2.1%
Model._save_tabledjango/db/models/base.py:11402 ms2.1%
Model._do_updatedjango/db/models/base.py:12442 ms2.1%
QuerySet._updatedjango/db/models/query.py:14482 ms2.1%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21502 ms2.1%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21212 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms2.1%
SQLUpdateCompiler.as_sqldjango/db/models/sql/compiler.py:20762 ms2.1%
Field.get_db_prep_savedjango/db/models/fields/__init__.py:10522 ms2.1%
DateTimeField.get_db_prep_valuedjango/db/models/fields/__init__.py:17252 ms2.1%
DateTimeField.get_prep_valuedjango/db/models/fields/__init__.py:17032 ms2.1%
authmastodon_auth/views.py:259 instance = Instance.objects.get(id=instance_id)2 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.1%
QuerySet.getdjango/db/models/query.py:7022 ms2.1%
QuerySet.__len__django/db/models/query.py:4212 ms2.1%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms2.1%
ModelIterable.__iter__django/db/models/query.py:1032 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3822 ms2.1%
SessionMiddleware.process_responsedjango/contrib/sessions/middleware.py:602 ms2.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms2.1%
Model.savedjango/db/models/base.py:9042 ms2.1%
Model.save_basedjango/db/models/base.py:9962 ms2.1%
Model._save_tabledjango/db/models/base.py:11162 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.1%
ClientHandler.__call__django/test/client.py:2072 ms2.1%
HttpResponseBase.closedjango/http/response.py:3482 ms2.1%
Signal.senddjango/dispatch/dispatcher.py:2492 ms2.1%
close_cachesdjango/core/cache/__init__.py:642 ms2.1%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:339 instance = Instance.objects.create(2 ms2.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.1%
QuerySet.createdjango/db/models/query.py:7362 ms2.1%
Model.savedjango/db/models/base.py:9042 ms2.1%
Model.save_basedjango/db/models/base.py:9922 ms2.1%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:346 cache.set(f"oauth:{state}", instance.id)2 ms2.1%
FileBasedCache.setdjango/core/cache/backends/filebased.py:572 ms2.1%
file_move_safedjango/core/files/move.py:422 ms2.1%
Estimated from 46 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:374
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Mocking
56 ms
mastodon_auth/views.py:334
account, __ = Account.objects.update_or_create(
auth · Database
6 ms
mastodon_auth/views.py:370
AccountAccess.objects.update_or_create(
auth · Database
3 ms
mastodon_auth/views.py:379
auth_login(request, user, backend=settings.AUTHENTICATION_BACKENDS[0])
auth · Mocking
3 ms
mastodon_auth/tests.py:339
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Database
2 ms
mastodon_auth/tests.py:346
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Cache
2 ms
mastodon_auth/views.py:259
instance = Instance.objects.get(id=instance_id)
auth · Database
2 ms

Fixtures

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

Database

33 queries · 9 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:374
73 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
8 hours ago CI github-actions:test passed 74 ms d923a46 main Profile
8 hours ago CI github-actions:test passed 189 ms 82997f8 main Profile
9 hours ago CI github-actions:test passed 221 ms 623aa3e main Profile
13 hours ago CI github-actions:test passed 221 ms ab6465a main Profile
14 hours ago CI github-actions:test passed 97 ms 0c23747 main Run