Tests / mastodon_auth/tests.py
MastodonAuthCallbackTests::test_keyerror_without_token_errors
First seen 14 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
141 ms
median 156 ms
max 198 ms
max 198 ms
Phases
Setup 3 ms
Call 138 ms
Teardown 0.31 ms
Categories
Database 4 ms
Other (Mocking, Cache, Libraries, pytest, ...) 137 ms
8 database queries per run
Needs 6 KB of memory (max 12 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 8 hours ago ·
open run
call52 ms98.3%
CallInfo.from_call_pytest/runner.py:36152 ms98.3%
call_and_report.<locals>.<lambda>_pytest/runner.py:25052 ms98.3%
HookCaller.__call__pluggy/_hooks.py:51252 ms98.3%
PluginManager._hookexecpluggy/_manager.py:12052 ms98.3%
_multicallpluggy/_callers.py:12152 ms98.3%
pytest_runtest_call_pytest/runner.py:18452 ms98.3%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:61452 ms98.3%
SimpleTestCase.__call__django/test/testcases.py:31452 ms98.3%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36952 ms98.3%
TestCase.__call__<stdlib>/unittest/case.py:74752 ms98.3%
TestCase.run<stdlib>/unittest/case.py:69152 ms98.3%
TestCase._callTestMethod<stdlib>/unittest/case.py:63752 ms98.3%
_patch.decorate_callable.<locals>.patched<stdlib>/unittest/mock.py:143952 ms98.3%
MastodonAuthCallbackTests.test_keyerror_without_token_errorsmastodon_auth/tests.py:403 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})46 ms86.0%
Client.getdjango/test/client.py:113346 ms86.0%
RequestFactory.getdjango/test/client.py:47546 ms86.0%
RequestFactory.genericdjango/test/client.py:67146 ms86.0%
Client.requestdjango/test/client.py:109146 ms86.0%
ClientHandler.__call__django/test/client.py:17343 ms81.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6343 ms81.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10443 ms81.9%
WhiteNoise.add_fileswhitenoise/base.py:10843 ms81.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12033 ms61.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13133 ms61.4%
WhiteNoise.get_static_filewhitenoise/base.py:21715 ms28.7%
StaticFile.__init__whitenoise/responders.py:737 ms12.3%
StaticFile.get_headerswhitenoise/responders.py:1764 ms8.2%
StaticFile.get_headerswhitenoise/responders.py:1782 ms4.1%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.1%
format_datetime<stdlib>/email/utils.py:2842 ms4.1%
StaticFile.__init__whitenoise/responders.py:774 ms8.2%
StaticFile.get_alternativeswhitenoise/responders.py:2012 ms4.1%
StaticFile.get_alternativeswhitenoise/responders.py:2062 ms4.1%
StaticFile.__init__whitenoise/responders.py:742 ms4.1%
parsedate<stdlib>/email/_parseaddr.py:1852 ms4.1%
StaticFile.__init__whitenoise/responders.py:722 ms4.1%
WhiteNoise.get_static_filewhitenoise/base.py:21111 ms20.5%
WhiteNoise.add_mime_headerswhitenoise/base.py:23011 ms20.5%
Headers.add_header<stdlib>/wsgiref/headers.py:18511 ms20.5%
<GC>~11 ms20.5%
WhiteNoise.get_static_filewhitenoise/base.py:2127 ms12.3%
WhiteNoise.add_cache_headerswhitenoise/base.py:2362 ms4.1%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms4.1%
WhiteNoise.add_cache_headerswhitenoise/base.py:2332 ms4.1%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms4.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms4.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11511 ms20.5%
scantreewhitenoise/base.py:27111 ms20.5%
scantreewhitenoise/base.py:2719 ms16.4%
scantreewhitenoise/base.py:2714 ms8.2%
scantreewhitenoise/base.py:2714 ms8.2%
scantreewhitenoise/base.py:2714 ms8.2%
scantreewhitenoise/base.py:2692 ms4.1%
scantreewhitenoise/base.py:2732 ms4.1%
scantreewhitenoise/base.py:2732 ms4.1%
scantreewhitenoise/base.py:2692 ms4.1%
scantreewhitenoise/base.py:2732 ms4.1%
ClientHandler.__call__django/test/client.py:1862 ms4.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1422 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1452 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms4.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms4.1%
BaseHandler._get_responsedjango/core/handlers/base.py:1992 ms4.1%
authmastodon_auth/views.py:259 instance = Instance.objects.get(id=instance_id)2 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet.getdjango/db/models/query.py:7022 ms4.1%
QuerySet.__len__django/db/models/query.py:4212 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms4.1%
ModelIterable.__iter__django/db/models/query.py:1032 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16232 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3202 ms4.1%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2982 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
MastodonAuthCallbackTests.test_keyerror_without_token_errorsmastodon_auth/tests.py:396 cache.set(f"oauth:{state}", instance.id)7 ms12.3%
FileBasedCache.setdjango/core/cache/backends/filebased.py:574 ms8.2%
file_move_safedjango/core/files/move.py:424 ms8.2%
FileBasedCache.setdjango/core/cache/backends/filebased.py:522 ms4.1%
mkstemp<stdlib>/tempfile.py:4082 ms4.1%
_mkstemp_inner<stdlib>/tempfile.py:2562 ms4.1%
Estimated from 24 samples; phase durations are exact. Frames from pytest and pluggy are
shown
.
Hot lines in your code
|
mastodon_auth/tests.py:403
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_keyerror_without_token_errors
· Mocking
|
43 ms |
|
mastodon_auth/tests.py:396
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_keyerror_without_token_errors
· Cache
|
7 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.04 ms |
| _django_db_marker function | 0.04 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.02 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
8 queries · 2 msNo repeated queries.
Biggest pieces of work
|
call test body
mastodon_auth/tests.py:403
|
52 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 8 hours ago | CI github-actions:test | passed | 53 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 176 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 198 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 136 ms | Profile |
| 14 hours ago | CI github-actions:test | passed | 72 ms | Run |