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

MastodonAuthCallbackTests::test_token_response_without_scope_still_logs_in

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
124 ms
median 98 ms
max 221 ms
Phases
Setup 1 ms Call 122 ms Teardown 0.30 ms
Categories
Database 29 ms Other (Mocking, Cache, pytest, Unsampled, ...) 94 ms

33 database queries per run

Needs 334 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call71 ms98.6%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:460 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})64 ms88.9%
Client.getdjango/test/client.py:113364 ms88.9%
RequestFactory.getdjango/test/client.py:47564 ms88.9%
RequestFactory.genericdjango/test/client.py:67164 ms88.9%
Client.requestdjango/test/client.py:109163 ms87.5%
ClientHandler.__call__django/test/client.py:17347 ms65.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6347 ms65.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10447 ms65.3%
WhiteNoise.add_fileswhitenoise/base.py:10847 ms65.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12040 ms55.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13140 ms55.6%
WhiteNoise.get_static_filewhitenoise/base.py:21729 ms40.3%
StaticFile.__init__whitenoise/responders.py:7710 ms13.9%
StaticFile.get_alternativeswhitenoise/responders.py:2006 ms8.3%
__init____init__:-15 ms6.9%
Headers.__init__<stdlib>/wsgiref/headers.py:443 ms4.2%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:503 ms4.2%
Headers.__init__<stdlib>/wsgiref/headers.py:432 ms2.8%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.8%
Headers.items<stdlib>/wsgiref/headers.py:1390.99 ms1.4%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms2.8%
Headers.__setitem__<stdlib>/wsgiref/headers.py:642 ms2.8%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:460.99 ms1.4%
StaticFile.get_alternativeswhitenoise/responders.py:2032 ms2.8%
Headers.__setitem__<stdlib>/wsgiref/headers.py:622 ms2.8%
Headers.__delitem__<stdlib>/wsgiref/headers.py:710.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
Headers.__delitem__<stdlib>/wsgiref/headers.py:720.99 ms1.4%
StaticFile.__init__whitenoise/responders.py:739 ms12.5%
StaticFile.get_headerswhitenoise/responders.py:1763 ms4.2%
formatdate<stdlib>/email/utils.py:2590.99 ms1.4%
formatdate<stdlib>/email/utils.py:2660.99 ms1.4%
format_datetime<stdlib>/email/utils.py:2840.99 ms1.4%
_format_timetuple_and_zone<stdlib>/email/utils.py:2310.99 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1672 ms2.8%
__init____init__:-12 ms2.8%
Headers.__init__<stdlib>/wsgiref/headers.py:430.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
Headers.__init__<stdlib>/wsgiref/headers.py:440.99 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1812 ms2.8%
Headers.__setitem__<stdlib>/wsgiref/headers.py:640.99 ms1.4%
Headers.__setitem__<stdlib>/wsgiref/headers.py:620.99 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1780.99 ms1.4%
Headers.__getitem__<stdlib>/wsgiref/headers.py:830.99 ms1.4%
Headers.get<stdlib>/wsgiref/headers.py:1060.99 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1770.99 ms1.4%
Headers.__contains__<stdlib>/wsgiref/headers.py:870.99 ms1.4%
Headers.get<stdlib>/wsgiref/headers.py:1040.99 ms1.4%
StaticFile.__init__whitenoise/responders.py:766 ms8.3%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1904 ms5.6%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1880.99 ms1.4%
Headers.__contains__<stdlib>/wsgiref/headers.py:870.99 ms1.4%
Headers.get<stdlib>/wsgiref/headers.py:1040.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1890.99 ms1.4%
Headers.__getitem__<stdlib>/wsgiref/headers.py:830.99 ms1.4%
Headers.get<stdlib>/wsgiref/headers.py:1040.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
StaticFile.__init__whitenoise/responders.py:743 ms4.2%
parsedate<stdlib>/email/_parseaddr.py:1850.99 ms1.4%
parsedate_tz<stdlib>/email/_parseaddr.py:500.99 ms1.4%
_parsedate_tz<stdlib>/email/_parseaddr.py:1620.99 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2127 ms9.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2337 ms9.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1766 ms8.3%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1976 ms8.3%
URLMixin.urldebug_toolbar/panels/staticfiles.py:206 ms8.3%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2356 ms8.3%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms2.8%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2072 ms2.8%
urljoin<stdlib>/urllib/parse.py:7070.99 ms1.4%
_urlsplit<stdlib>/urllib/parse.py:6200.99 ms1.4%
urljoin<stdlib>/urllib/parse.py:7050.99 ms1.4%
_coerce_args<stdlib>/urllib/parse.py:1270.99 ms1.4%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2142 ms2.8%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:6090.99 ms1.4%
ManifestFilesMixin.stored_namedjango/contrib/staticfiles/storage.py:6110.99 ms1.4%
urlunsplit<stdlib>/urllib/parse.py:6650.99 ms1.4%
_coerce_args<stdlib>/urllib/parse.py:1260.99 ms1.4%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2080.99 ms1.4%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2290.99 ms1.4%
unquote<stdlib>/urllib/parse.py:8460.99 ms1.4%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1730.99 ms1.4%
WhiteNoiseMiddleware.get_name_without_hashwhitenoise/middleware.py:1910.99 ms1.4%
splitext<frozen posixpath>:1260.99 ms1.4%
_splitext<frozen genericpath>:1750.99 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2112 ms2.8%
WhiteNoise.add_mime_headerswhitenoise/base.py:2302 ms2.8%
Headers.add_header<stdlib>/wsgiref/headers.py:1860.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.99 ms1.4%
Headers.add_header<stdlib>/wsgiref/headers.py:1920.99 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2140.99 ms1.4%
Headers.__setitem__<stdlib>/wsgiref/headers.py:640.99 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:520.99 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2190.99 ms1.4%
Headers.items<stdlib>/wsgiref/headers.py:1390.99 ms1.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1157 ms9.7%
scantreewhitenoise/base.py:2717 ms9.7%
scantreewhitenoise/base.py:2716 ms8.3%
scantreewhitenoise/base.py:2713 ms4.2%
scantreewhitenoise/base.py:2713 ms4.2%
scantreewhitenoise/base.py:2712 ms2.8%
scantreewhitenoise/base.py:2732 ms2.8%
scantreewhitenoise/base.py:2730.99 ms1.4%
scantreewhitenoise/base.py:2733 ms4.2%
scantreewhitenoise/base.py:2690.99 ms1.4%
ClientHandler.__call__django/test/client.py:18616 ms22.2%
BaseHandler.get_responsedjango/core/handlers/base.py:14216 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12316 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14516 ms22.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.2%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
MiddlewareMixin.__call__django/utils/deprecation.py:38015 ms20.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5615 ms20.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19915 ms20.8%
authmastodon_auth/views.py:333 account, __ = Account.objects.update_or_create(5 ms6.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms6.9%
QuerySet.update_or_createdjango/db/models/query.py:10964 ms5.6%
QuerySet.get_or_createdjango/db/models/query.py:10542 ms2.8%
QuerySet.getdjango/db/models/query.py:6920.99 ms1.4%
QuerySet.filterdjango/db/models/query.py:16760.99 ms1.4%
QuerySet._filter_or_excludedjango/db/models/query.py:16940.99 ms1.4%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17040.99 ms1.4%
Q.__init__django/db/models/query_utils.py:580.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
QuerySet.get_or_createdjango/db/models/query.py:10590.99 ms1.4%
Atomic.__enter__django/db/transaction.py:2230.99 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.99 ms1.4%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4000.99 ms1.4%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3670.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1030.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
QuerySet.get_or_createdjango/db/models/query.py:10610.99 ms1.4%
QuerySet.createdjango/db/models/query.py:7360.99 ms1.4%
Model.savedjango/db/models/base.py:9040.99 ms1.4%
Model.save_basedjango/db/models/base.py:9960.99 ms1.4%
Model._save_tabledjango/db/models/base.py:11990.99 ms1.4%
Model._do_insertdjango/db/models/base.py:12510.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet._insertdjango/db/models/query.py:21410.99 ms1.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
QuerySet.update_or_createdjango/db/models/query.py:10930.99 ms1.4%
Atomic.__exit__django/db/transaction.py:2590.99 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.99 ms1.4%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4310.99 ms1.4%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3750.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1030.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
authmastodon_auth/views.py:378 auth_login(request, user, backend=settings.AUTHENTICATION_BACKENDS[0])3 ms4.2%
logindjango/contrib/auth/__init__.py:1982 ms2.8%
Signal.senddjango/dispatch/dispatcher.py:2492 ms2.8%
update_last_logindjango/contrib/auth/models.py:242 ms2.8%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms2.8%
Model.savedjango/db/models/base.py:9042 ms2.8%
Model.save_basedjango/db/models/base.py:9962 ms2.8%
Model._save_tabledjango/db/models/base.py:11402 ms2.8%
Model._do_updatedjango/db/models/base.py:12442 ms2.8%
QuerySet._updatedjango/db/models/query.py:14482 ms2.8%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21502 ms2.8%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21212 ms2.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16120.99 ms1.4%
SQLUpdateCompiler.as_sqldjango/db/models/sql/compiler.py:20980.99 ms1.4%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
logindjango/contrib/auth/__init__.py:1890.99 ms1.4%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4370.99 ms1.4%
SessionStore.createdjango/contrib/sessions/backends/db.py:700.99 ms1.4%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2000.99 ms1.4%
get_random_stringdjango/utils/crypto.py:780.99 ms1.4%
get_random_string.<locals>.<genexpr>django/utils/crypto.py:780.99 ms1.4%
Random.choice<stdlib>/random.py:3540.99 ms1.4%
Random._randbelow_with_getrandbits<stdlib>/random.py:2490.99 ms1.4%
SystemRandom.getrandbits<stdlib>/random.py:9150.99 ms1.4%
authmastodon_auth/views.py:247 instance_id = cache.get(f"oauth:{state}")2 ms2.8%
FileBasedCache.getdjango/core/cache/backends/filebased.py:362 ms2.8%
authmastodon_auth/views.py:367 user, __ = User.objects.get_or_create(username=account.username_at_instance)2 ms2.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.8%
QuerySet.get_or_createdjango/db/models/query.py:10540.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
QuerySet.get_or_createdjango/db/models/query.py:10610.99 ms1.4%
QuerySet.createdjango/db/models/query.py:7360.99 ms1.4%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:620.99 ms1.4%
Model.savedjango/db/models/base.py:9040.99 ms1.4%
Model.save_basedjango/db/models/base.py:9960.99 ms1.4%
Model._save_tabledjango/db/models/base.py:11990.99 ms1.4%
Model._do_insertdjango/db/models/base.py:12510.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet._insertdjango/db/models/query.py:21410.99 ms1.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
authmastodon_auth/views.py:369 AccountAccess.objects.update_or_create(2 ms2.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.8%
QuerySet.update_or_createdjango/db/models/query.py:10962 ms2.8%
QuerySet.get_or_createdjango/db/models/query.py:10540.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
QuerySet.get_or_createdjango/db/models/query.py:10610.99 ms1.4%
QuerySet.createdjango/db/models/query.py:7360.99 ms1.4%
Model.savedjango/db/models/base.py:9040.99 ms1.4%
Model.save_basedjango/db/models/base.py:9960.99 ms1.4%
Model._save_tabledjango/db/models/base.py:11990.99 ms1.4%
Model._do_insertdjango/db/models/base.py:12510.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet._insertdjango/db/models/query.py:21410.99 ms1.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
authmastodon_auth/views.py:258 instance = Instance.objects.get(id=instance_id)0.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.99 ms1.4%
SessionMiddleware.process_responsedjango/contrib/sessions/middleware.py:600.99 ms1.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1270.99 ms1.4%
Model.savedjango/db/models/base.py:9040.99 ms1.4%
Model.save_basedjango/db/models/base.py:9960.99 ms1.4%
Model._save_tabledjango/db/models/base.py:11400.99 ms1.4%
Model._do_updatedjango/db/models/base.py:12440.99 ms1.4%
QuerySet._updatedjango/db/models/query.py:14480.99 ms1.4%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21500.99 ms1.4%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21210.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
Client.requestdjango/test/client.py:10860.99 ms1.4%
Signal.connectdjango/dispatch/dispatcher.py:1600.99 ms1.4%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()2 ms2.8%
TestCase._fixture_setupdjango/test/testcases.py:14812 ms2.8%
TestCase._enter_atomicsdjango/test/testcases.py:13992 ms2.8%
Atomic.__enter__django/db/transaction.py:2232 ms2.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.8%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms2.8%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms2.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.8%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.8%
Cursor.executepsycopg/cursor.py:1132 ms2.8%
Connection.waitpsycopg/connection.py:4952 ms2.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.8%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:425 instance = Instance.objects.create(0.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet.createdjango/db/models/query.py:7340.99 ms1.4%
Model.__init__django/db/models/base.py:5880.99 ms1.4%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:432 cache.set(f"oauth:{state}", instance.id)0.99 ms1.4%
FileBasedCache.setdjango/core/cache/backends/filebased.py:510.99 ms1.4%
FileBasedCache._culldjango/core/cache/backends/filebased.py:1090.99 ms1.4%
FileBasedCache._list_cache_filesdjango/core/cache/backends/filebased.py:1700.99 ms1.4%
glob<stdlib>/glob.py:430.99 ms1.4%
_iglob<stdlib>/glob.py:1080.99 ms1.4%
_glob1<stdlib>/glob.py:1360.99 ms1.4%
_listdir<stdlib>/glob.py:2000.99 ms1.4%
_iterdir<stdlib>/glob.py:1820.99 ms1.4%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:463 access = AccountAccess.objects.get()0.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_inmastodon_auth/tests.py:465 account = Account.objects.get(account_id="42")0.99 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.99 ms1.4%
QuerySet.getdjango/db/models/query.py:7020.99 ms1.4%
QuerySet.__len__django/db/models/query.py:4210.99 ms1.4%
QuerySet._fetch_alldjango/db/models/query.py:22620.99 ms1.4%
ModelIterable.__iter__django/db/models/query.py:1030.99 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1050.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()0.99 ms1.4%
TestCase._fixture_teardowndjango/test/testcases.py:14980.99 ms1.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4950.99 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.99 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.99 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1030.99 ms1.4%
Cursor.executepsycopg/cursor.py:1130.99 ms1.4%
Connection.waitpsycopg/connection.py:4950.99 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.99 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.99 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.99 ms1.4%
teardown0.29 ms0.4%
Estimated from 72 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:460
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Mocking
49 ms
mastodon_auth/views.py:333
account, __ = Account.objects.update_or_create(
auth · Database
5 ms
mastodon_auth/views.py:378
auth_login(request, user, backend=settings.AUTHENTICATION_BACKENDS[0])
auth · Database
3 ms
mastodon_auth/views.py:247
instance_id = cache.get(f"oauth:{state}")
auth · Cache
2 ms
mastodon_auth/views.py:367
user, __ = User.objects.get_or_create(username=account.username_at_instance)
auth · Database
2 ms
mastodon_auth/views.py:369
AccountAccess.objects.update_or_create(
auth · Database
2 ms
mastodon_auth/tests.py:425
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Database
0.99 ms
mastodon_auth/tests.py:432
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Cache
0.99 ms
mastodon_auth/views.py:258
instance = Instance.objects.get(id=instance_id)
auth · Database
0.99 ms
mastodon_auth/tests.py:463
access = AccountAccess.objects.get()
MastodonAuthCallbackTests.test_token_response_without_scope_still_logs_in · Database
0.99 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.05 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_marker function 0.03 ms
_django_isolate_apps function 0.03 ms
_live_server_helper 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

33 queries · 11 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:460
68 ms
call _pre_setup
django/test/testcases.py:1167
2 ms
call _post_teardown
django/test/testcases.py:1243
0.99 ms
teardown pytest internals 0.29 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 72 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 86 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 80 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 64 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 162 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 98 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 75 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 153 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 111 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 74 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 189 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 221 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 221 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 97 ms 0c23747 main Run