Tests / mastodon_auth/tests.py
MastodonAuthCallbackTests::test_invalid_grant_is_logged_as_warning_not_error
First seen 13 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
170 ms
median 175 ms
max 183 ms
max 183 ms
Phases
Setup 2 ms
Call 168 ms
Teardown 0.28 ms
Categories
Database 6 ms
Other (Mocking, Cache, Libraries, Unsampled, ...) 164 ms
8 database queries per run
Needs 38 KB of memory (max 140 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 8 hours ago ·
open run
call145 ms99.4%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:536 cache.set(f"oauth:{state}", instance.id)120 ms82.4%
FileBasedCache.setdjango/core/cache/backends/filebased.py:57120 ms82.4%
file_move_safedjango/core/files/move.py:42120 ms82.4%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:546 response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})22 ms15.3%
Client.getdjango/test/client.py:113322 ms15.3%
RequestFactory.getdjango/test/client.py:47522 ms15.3%
RequestFactory.genericdjango/test/client.py:67122 ms15.3%
Client.requestdjango/test/client.py:109122 ms15.3%
ClientHandler.__call__django/test/client.py:17321 ms14.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6321 ms14.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10421 ms14.4%
WhiteNoise.add_fileswhitenoise/base.py:10821 ms14.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12011 ms7.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13111 ms7.6%
WhiteNoise.get_static_filewhitenoise/base.py:2177 ms5.1%
StaticFile.__init__whitenoise/responders.py:764 ms2.5%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1884 ms2.5%
StaticFile.__init__whitenoise/responders.py:732 ms1.7%
StaticFile.get_headerswhitenoise/responders.py:1761 ms0.8%
StaticFile.__init__whitenoise/responders.py:721 ms0.8%
WhiteNoise.get_static_filewhitenoise/base.py:2122 ms1.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2332 ms1.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms1.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms1.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:201 ms0.8%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2351 ms0.8%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2141 ms0.8%
URLMixin.urldebug_toolbar/panels/staticfiles.py:211 ms0.8%
<GC>~1 ms0.8%
WhiteNoise.get_static_filewhitenoise/base.py:2111 ms0.8%
WhiteNoise.add_mime_headerswhitenoise/base.py:2251 ms0.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1159 ms5.9%
scantreewhitenoise/base.py:2714 ms2.5%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2712 ms1.7%
scantreewhitenoise/base.py:2711 ms0.8%
scantreewhitenoise/base.py:2731 ms0.8%
scantreewhitenoise/base.py:2731 ms0.8%
scantreewhitenoise/base.py:2731 ms0.8%
scantreewhitenoise/base.py:2734 ms2.5%
ClientHandler.__call__django/test/client.py:1861 ms0.8%
BaseHandler.get_responsedjango/core/handlers/base.py:1421 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1231 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1451 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms0.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms0.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1991 ms0.8%
authmastodon_auth/views.py:259 instance = Instance.objects.get(id=instance_id)1 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.8%
QuerySet.getdjango/db/models/query.py:7021 ms0.8%
QuerySet.__len__django/db/models/query.py:4211 ms0.8%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms0.8%
ModelIterable.__iter__django/db/models/query.py:1031 ms0.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.8%
Cursor.executepsycopg/cursor.py:1131 ms0.8%
Connection.waitpsycopg/connection.py:4951 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.8%
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_errormastodon_auth/tests.py:529 instance = Instance.objects.create(1 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.8%
QuerySet.createdjango/db/models/query.py:7361 ms0.8%
Model.savedjango/db/models/base.py:9041 ms0.8%
Model.save_basedjango/db/models/base.py:9961 ms0.8%
Model._save_tabledjango/db/models/base.py:11991 ms0.8%
Model._do_insertdjango/db/models/base.py:12511 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.8%
QuerySet._insertdjango/db/models/query.py:21411 ms0.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.8%
Cursor.executepsycopg/cursor.py:1131 ms0.8%
Connection.waitpsycopg/connection.py:4951 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms0.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms0.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms0.8%
Estimated from 117 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
mastodon_auth/tests.py:536
cache.set(f"oauth:{state}", instance.id)
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error
· Cache
|
120 ms |
|
mastodon_auth/tests.py:546
response = self.client.get("/mastodon_auth/", {"code": "abc", "state": state})
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error
· Mocking
|
21 ms |
|
mastodon_auth/tests.py:529
instance = Instance.objects.create(
MastodonAuthCallbackTests.test_invalid_grant_is_logged_as_warning_not_error
· Database
|
1 ms |
|
mastodon_auth/views.py:259
instance = Instance.objects.get(id=instance_id)
auth
· Database
|
1 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.05 ms |
| _template_string_if_invalid_marker function | 0.03 ms |
| _django_db_marker function | 0.03 ms |
| _django_isolate_apps 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
8 queries · 2 msNo repeated queries.
Biggest pieces of work
|
call test body
mastodon_auth/tests.py:536
|
144 ms |
| call pytest internals | 1 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 | 146 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 169 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 182 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 183 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 134 ms | Run |