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

MastodonAuthCallbackTests::test_keyerror_without_token_errors

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
109 ms
median 106 ms
max 198 ms
Phases
Setup 2 ms Call 107 ms Teardown 0.41 ms
Categories
Database 9 ms Other (Mocking, Libraries, Cache, pytest, ...) 100 ms

8 database queries per run

Needs 160 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
call89 ms98.9%
MastodonAuthCallbackTests.test_keyerror_without_token_errorsmastodon_auth/tests.py:489 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})47 ms52.1%
Client.getdjango/test/client.py:113347 ms52.1%
RequestFactory.getdjango/test/client.py:47547 ms52.1%
RequestFactory.genericdjango/test/client.py:67147 ms52.1%
Client.requestdjango/test/client.py:109147 ms52.1%
ClientHandler.__call__django/test/client.py:17344 ms48.6%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6344 ms48.6%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10441 ms45.9%
WhiteNoise.add_fileswhitenoise/base.py:10841 ms45.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12031 ms34.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13131 ms34.4%
WhiteNoise.get_static_filewhitenoise/base.py:21729 ms31.8%
StaticFile.__init__whitenoise/responders.py:7422 ms24.7%
parsedate<stdlib>/email/_parseaddr.py:18522 ms24.7%
parsedate_tz<stdlib>/email/_parseaddr.py:5021 ms23.8%
_parsedate_tz<stdlib>/email/_parseaddr.py:9620 ms22.1%
_parsedate_tz<stdlib>/email/_parseaddr.py:762 ms1.8%
StaticFile.__init__whitenoise/responders.py:773 ms3.5%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms2.6%
__init____init__:-12 ms2.6%
Headers.__init__<stdlib>/wsgiref/headers.py:432 ms2.6%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.6%
StaticFile.get_alternativeswhitenoise/responders.py:1980.79 ms0.9%
StaticFile.__init__whitenoise/responders.py:732 ms2.6%
StaticFile.get_headerswhitenoise/responders.py:1782 ms2.6%
parsedate<stdlib>/email/_parseaddr.py:1852 ms2.6%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms2.6%
_parsedate_tz<stdlib>/email/_parseaddr.py:1172 ms2.6%
StaticFile.__init__whitenoise/responders.py:760.79 ms0.9%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1880.79 ms0.9%
WhiteNoise.get_static_filewhitenoise/base.py:2140.79 ms0.9%
WhiteNoise.get_static_filewhitenoise/base.py:2120.79 ms0.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:2330.79 ms0.9%
WhiteNoise.get_static_filewhitenoise/base.py:2110.79 ms0.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11510 ms11.5%
scantreewhitenoise/base.py:2719 ms9.7%
scantreewhitenoise/base.py:2718 ms8.8%
scantreewhitenoise/base.py:2715 ms5.3%
scantreewhitenoise/base.py:2715 ms5.3%
scantreewhitenoise/base.py:2714 ms4.4%
scantreewhitenoise/base.py:2693 ms3.5%
scantreewhitenoise/base.py:2730.79 ms0.9%
<GC>~0.79 ms0.9%
scantreewhitenoise/base.py:2730.79 ms0.9%
scantreewhitenoise/base.py:2733 ms3.5%
scantreewhitenoise/base.py:2730.79 ms0.9%
scantreewhitenoise/base.py:2690.79 ms0.9%
scantreewhitenoise/base.py:2730.79 ms0.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1112 ms2.6%
WhiteNoise.add_fileswhitenoise/base.py:1082 ms2.6%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1202 ms2.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1312 ms2.6%
WhiteNoise.get_static_filewhitenoise/base.py:2172 ms2.6%
StaticFile.__init__whitenoise/responders.py:732 ms2.6%
ClientHandler.__call__django/test/client.py:1863 ms3.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1423 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1233 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1453 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1993 ms3.5%
authmastodon_auth/views.py:316 logger.exception("login log_in unexpected token response for %s", instance.url)2 ms2.6%
Logger.exception<stdlib>/logging/__init__.py:15632 ms2.6%
Logger.error<stdlib>/logging/__init__.py:15572 ms2.6%
Logger._log<stdlib>/logging/__init__.py:16732 ms2.6%
Logger.handle<stdlib>/logging/__init__.py:16892 ms2.6%
Logger.callHandlers<stdlib>/logging/__init__.py:17492 ms2.6%
Handler.handle<stdlib>/logging/__init__.py:10302 ms2.6%
StreamHandler.emit<stdlib>/logging/__init__.py:11542 ms2.6%
Handler.format<stdlib>/logging/__init__.py:10022 ms2.6%
Formatter.format<stdlib>/logging/__init__.py:7202 ms2.6%
Formatter.formatException<stdlib>/logging/__init__.py:6702 ms2.6%
print_exception<stdlib>/traceback.py:1742 ms2.6%
TracebackException.__init__<stdlib>/traceback.py:11482 ms2.6%
StackSummary._extract_from_extended_frame_gen<stdlib>/traceback.py:5532 ms2.6%
FrameSummary.line<stdlib>/traceback.py:4222 ms2.6%
FrameSummary._set_lines<stdlib>/traceback.py:4002 ms2.6%
getline<frozen linecache>:262 ms2.6%
getlines<frozen linecache>:412 ms2.6%
updatecache<frozen linecache>:1972 ms1.8%
open<stdlib>/tokenize.py:4662 ms1.8%
updatecache<frozen linecache>:1980.79 ms0.9%
authmastodon_auth/views.py:258 instance = Instance.objects.get(id=instance_id)0.79 ms0.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.79 ms0.9%
QuerySet.getdjango/db/models/query.py:7020.79 ms0.9%
QuerySet.__len__django/db/models/query.py:4210.79 ms0.9%
QuerySet._fetch_alldjango/db/models/query.py:22620.79 ms0.9%
ModelIterable.__iter__django/db/models/query.py:1030.79 ms0.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.79 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:790.79 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.79 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1050.79 ms0.9%
Cursor.executepsycopg/cursor.py:1130.79 ms0.9%
Connection.waitpsycopg/connection.py:4950.79 ms0.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.79 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.79 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.79 ms0.9%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()39 ms43.3%
TestCase._fixture_setupdjango/test/testcases.py:148139 ms43.3%
TestCase._enter_atomicsdjango/test/testcases.py:139939 ms43.3%
Atomic.__enter__django/db/transaction.py:22339 ms43.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2639 ms43.3%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:40039 ms43.3%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:36739 ms43.3%
CursorWrapper.executedjango/db/backends/utils.py:7939 ms43.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9239 ms43.3%
CursorWrapper._executedjango/db/backends/utils.py:10339 ms43.3%
Cursor.executepsycopg/cursor.py:11339 ms43.3%
Connection.waitpsycopg/connection.py:49539 ms43.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:20639 ms43.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28639 ms43.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7839 ms43.3%
MastodonAuthCallbackTests.test_keyerror_without_token_errorsmastodon_auth/tests.py:492 self.assertFalse(AccountAccess.objects.exists())2 ms1.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms1.8%
QuerySet.existsdjango/db/models/query.py:14582 ms1.8%
Query.has_resultsdjango/db/models/sql/query.py:6872 ms1.8%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15932 ms1.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16120.79 ms0.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7680.79 ms0.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:910.79 ms0.9%
WhereNode.split_having_qualifydjango/db/models/sql/where.py:470.79 ms0.9%
cached_property.__get__django/utils/functional.py:470.79 ms0.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.79 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:790.79 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.79 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1050.79 ms0.9%
Cursor.executepsycopg/cursor.py:1130.79 ms0.9%
Connection.waitpsycopg/connection.py:4950.79 ms0.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.79 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.79 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.79 ms0.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()0.79 ms0.9%
TestCase._fixture_teardowndjango/test/testcases.py:14980.79 ms0.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4950.79 ms0.9%
CursorWrapper.executedjango/db/backends/utils.py:790.79 ms0.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.79 ms0.9%
CursorWrapper._executedjango/db/backends/utils.py:1030.79 ms0.9%
Cursor.executepsycopg/cursor.py:1130.79 ms0.9%
Connection.waitpsycopg/connection.py:4950.79 ms0.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.79 ms0.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.79 ms0.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.79 ms0.9%
Estimated from 112 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:489
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_keyerror_without_token_errors · Mocking
44 ms
mastodon_auth/views.py:316
logger.exception("login log_in unexpected token response for %s", instance.url)
auth · Mocking
2 ms
mastodon_auth/tests.py:492
self.assertFalse(AccountAccess.objects.exists())
MastodonAuthCallbackTests.test_keyerror_without_token_errors · Database
2 ms
mastodon_auth/views.py:258
instance = Instance.objects.get(id=instance_id)
auth · Database
0.79 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
_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

8 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:489
48 ms
call _pre_setup
django/test/testcases.py:1167
39 ms
call _post_teardown
django/test/testcases.py:1243
0.79 ms
call pytest internals 0.79 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 90 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 106 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 38 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 107 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 107 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 129 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 101 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 85 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 53 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 176 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 198 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 136 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 72 ms 0c23747 main Run