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

MastodonLoginViewTests::test_create_app_failure_without_existing_credentials_errors

First seen 3 months, 3 weeks ago in 553d048
CI github-actions:test 4 runs
Average
176 ms
median 199 ms
max 235 ms
Phases
Setup 18 ms Call 156 ms Teardown 1 ms
Categories
Database 25 ms Other (Mocking, pytest, Unsampled, Libraries) 151 ms

7 database queries per run

Needs 18 KB of memory (max 64 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 8 hours ago · open run
Show pytest frames
setup10 ms14.3%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()6 ms8.2%
TestCase._enter_atomicsdjango/test/testcases.py:13996 ms8.2%
Atomic.__enter__django/db/transaction.py:2106 ms8.2%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4546 ms8.2%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3046 ms8.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms8.2%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2796 ms8.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms8.2%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2566 ms8.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:266 ms8.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3456 ms8.2%
Connection.connectpsycopg/connection.py:1096 ms8.2%
wait_connpsycopg/waiting.py:1455 ms7.2%
BaseConnection._connect_genpsycopg/_connection_base.py:4395 ms7.2%
wait_connpsycopg/waiting.py:1360.72 ms1.0%
BaseConnection._connect_genpsycopg/_connection_base.py:4390.72 ms1.0%
call60 ms85.3%
MastodonLoginViewTests.test_create_app_failure_without_existing_credentials_errorsmastodon_auth/tests.py:192 response = self.client.post("/mastodon_login/", {"instance": "det.social"})54 ms76.8%
Client.postdjango/test/client.py:116254 ms76.8%
RequestFactory.postdjango/test/client.py:49954 ms76.8%
RequestFactory.genericdjango/test/client.py:67154 ms76.8%
Client.requestdjango/test/client.py:109154 ms76.8%
ClientHandler.__call__django/test/client.py:17338 ms54.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6338 ms54.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10438 ms54.0%
WhiteNoise.add_fileswhitenoise/base.py:10838 ms54.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12024 ms34.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13124 ms34.1%
WhiteNoise.get_static_filewhitenoise/base.py:21720 ms28.4%
StaticFile.__init__whitenoise/responders.py:7310 ms14.2%
StaticFile.get_headerswhitenoise/responders.py:1766 ms8.5%
formatdate<stdlib>/email/utils.py:2666 ms8.5%
format_datetime<stdlib>/email/utils.py:2846 ms8.5%
_format_timetuple_and_zone<stdlib>/email/utils.py:2316 ms8.5%
StaticFile.__init__whitenoise/responders.py:774 ms5.7%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms2.8%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms2.8%
StaticFile.__init__whitenoise/responders.py:724 ms5.7%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms2.8%
__init____init__:-12 ms2.8%
FileEntry.__init__whitenoise/responders.py:2632 ms2.8%
FileEntry.stat_regular_filewhitenoise/responders.py:2762 ms2.8%
<GC>~2 ms2.8%
StaticFile.__init__whitenoise/responders.py:762 ms2.8%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms2.8%
WhiteNoise.get_static_filewhitenoise/base.py:2124 ms5.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2332 ms2.8%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms2.8%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms2.8%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms2.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11514 ms19.9%
scantreewhitenoise/base.py:27114 ms19.9%
scantreewhitenoise/base.py:27110 ms14.2%
scantreewhitenoise/base.py:2694 ms5.7%
scantreewhitenoise/base.py:2714 ms5.7%
scantreewhitenoise/base.py:2714 ms5.7%
scantreewhitenoise/base.py:2732 ms2.8%
scantreewhitenoise/base.py:2712 ms2.8%
scantreewhitenoise/base.py:2732 ms2.8%
scantreewhitenoise/base.py:2732 ms2.8%
<GC>~2 ms2.8%
scantreewhitenoise/base.py:2732 ms2.8%
ClientHandler.__call__django/test/client.py:18616 ms22.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14216 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12316 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14516 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38016 ms22.7%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5616 ms22.7%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.9%
MiddlewareMixin.__call__django/utils/deprecation.py:38014 ms19.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5614 ms19.9%
BaseHandler._get_responsedjango/core/handlers/base.py:19914 ms19.9%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6314 ms19.9%
loginmastodon_auth/views.py:83 instance = Instance.objects.filter(url=api_base_url).first()12 ms17.1%
QuerySet.firstdjango/db/models/query.py:121212 ms17.1%
QuerySet.__iter__django/db/models/query.py:43912 ms17.1%
QuerySet._fetch_alldjango/db/models/query.py:226212 ms17.1%
ModelIterable.__iter__django/db/models/query.py:10312 ms17.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162512 ms17.1%
CursorWrapper.executedjango/db/backends/utils.py:7912 ms17.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9212 ms17.1%
CursorWrapper._executedjango/db/backends/utils.py:10512 ms17.1%
Cursor.executepsycopg/cursor.py:11312 ms17.1%
Connection.waitpsycopg/connection.py:49512 ms17.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2068 ms11.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2868 ms11.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:788 ms11.4%
loginmastodon_auth/views.py:59 form = MastodonLoginForm(request.POST)2 ms2.8%
WSGIRequest._get_postdjango/core/handlers/wsgi.py:932 ms2.8%
HttpRequest._load_post_and_filesdjango/http/request.py:4692 ms2.8%
HttpRequest.parse_file_uploaddjango/http/request.py:3942 ms2.8%
MultiPartParser.__init__django/http/multipartparser.py:582 ms2.8%
SysMonitor.sysmon_py_startcoverage/sysmon.py:345 disp = self.should_trace(filename, frame) # type: ignore[arg-type]2 ms2.8%
Coverage._should_tracecoverage/control.py:4522 ms2.8%
InOrOut.should_tracecoverage/inorout.py:4392 ms2.8%
InOrOut.check_include_omit_etccoverage/inorout.py:4692 ms2.8%
TreeMatcher.matchcoverage/files.py:2752 ms2.8%
abs_filecoverage/files.py:1582 ms2.8%
realpath<frozen posixpath>:4602 ms2.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3822 ms2.8%
MessageMiddleware.process_responsedjango/contrib/messages/middleware.py:232 ms2.8%
BaseStorage.updatedjango/contrib/messages/storage/base.py:1402 ms2.8%
FallbackStorage._storedjango/contrib/messages/storage/fallback.py:502 ms2.8%
CookieStorage._storedjango/contrib/messages/storage/cookie.py:1412 ms2.8%
CookieStorage._encode_partsdjango/contrib/messages/storage/cookie.py:1842 ms2.8%
Signer.sign_objectdjango/core/signing.py:2722 ms2.8%
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%
_patch.decoration_helper<stdlib>/unittest/mock.py:1416 with contextlib.ExitStack() as exit_stack:2 ms2.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms2.8%
TestCase._fixture_teardowndjango/test/testcases.py:15002 ms2.8%
TestCase._rollback_atomicsdjango/test/testcases.py:14082 ms2.8%
Atomic.__exit__django/db/transaction.py:2982 ms2.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.8%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms2.8%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 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%
teardown0.28 ms0.4%
Estimated from 45 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

mastodon_auth/tests.py:192
response = self.client.post("/mastodon_login/", {"instance": "det.social"})
MastodonLoginViewTests.test_create_app_failure_without_existing_credentials_errors · Mocking
40 ms
mastodon_auth/views.py:83
instance = Instance.objects.filter(url=api_base_url).first()
login · Database
12 ms
mastodon_auth/views.py:59
form = MastodonLoginForm(request.POST)
login · Mocking
2 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_MastodonLoginViewTests class 8 ms
_django_setup_unittest class 1 ms
_template_string_if_invalid_marker function 0.04 ms
_dj_autoclear_mailbox function 0.04 ms
_django_db_marker function 0.04 ms
_live_server_helper function 0.03 ms
_django_isolate_apps function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

7 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
mastodon_auth/tests.py:192
54 ms
setup setUpClass
django/test/testcases.py:1426
6 ms
setup pytest internals 4 ms
call _pre_setup
django/test/testcases.py:1167
2 ms
call decoration_helper
<stdlib>/unittest/mock.py:1416
2 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 9 results, oldest first in the strip
When Environment Outcome Duration Commit
8 hours ago CI github-actions:test passed 70 ms d923a46 main Profile
8 hours ago CI github-actions:test passed 201 ms 82997f8 main Profile
8 hours ago CI github-actions:test passed 196 ms 623aa3e main Profile
13 hours ago CI github-actions:test passed 235 ms ab6465a main Profile
13 hours ago CI github-actions:test passed 84 ms 0c23747 main Run
3 months, 3 weeks ago CI github-actions passed 139 ms 69d78ea HEAD Run
3 months, 3 weeks ago CI github-actions passed 193 ms 8fac7b5 main Run
3 months, 3 weeks ago CI github-actions passed 196 ms 36b9579 main Run
3 months, 3 weeks ago CI github-actions passed 84 ms 553d048 main Run