Tests / mastodon_auth/tests.py
MastodonLoginViewTests::test_create_app_rate_limited_reuses_existing_credentials
First seen 4 months, 2 weeks ago in 553d048
CI
github-actions:test
11 runs
Average
95 ms
median 84 ms
max 192 ms
max 192 ms
Phases
Setup 1 ms
Call 93 ms
Teardown 0.28 ms
Categories
Database 11 ms
Other (Mocking, pytest, Unsampled, Libraries, ...) 84 ms
8 database queries per run
Needs 13 KB of memory (max 76 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 7 hours ago ·
open run
call83 ms98.3%
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentialsmastodon_auth/tests.py:140 instance = Instance.objects.create(51 ms60.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8751 ms60.3%
QuerySet.createdjango/db/models/query.py:73651 ms60.3%
Model.savedjango/db/models/base.py:90451 ms60.3%
Model.save_basedjango/db/models/base.py:99649 ms58.1%
Model._save_tabledjango/db/models/base.py:119949 ms58.1%
Model._do_insertdjango/db/models/base.py:125149 ms58.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8749 ms58.1%
QuerySet._insertdjango/db/models/query.py:214149 ms58.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:193647 ms55.8%
CursorWrapper.executedjango/db/backends/utils.py:7947 ms55.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9247 ms55.8%
CursorWrapper._executedjango/db/backends/utils.py:10547 ms55.8%
Cursor.executepsycopg/cursor.py:11347 ms55.8%
Connection.waitpsycopg/connection.py:49547 ms55.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:20645 ms53.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28645 ms53.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7845 ms53.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms2.2%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms2.2%
PostgresClientQuery.convertpsycopg/_queries.py:2892 ms2.2%
PostgresClientQuery.dumppsycopg/_queries.py:2992 ms2.2%
PostgresClientQuery.dump.<locals>.<genexpr>psycopg/_queries.py:3002 ms2.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19352 ms2.2%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18802 ms2.2%
SQLInsertCompiler.assemble_as_sqldjango/db/backends/postgresql/compiler.py:552 ms2.2%
SQLInsertCompiler.assemble_as_sqldjango/db/models/sql/compiler.py:17942 ms2.2%
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentialsmastodon_auth/tests.py:148 response = self.client.post("/mastodon_login/", {"instance": "det.social"})25 ms29.0%
Client.postdjango/test/client.py:116225 ms29.0%
RequestFactory.postdjango/test/client.py:49925 ms29.0%
RequestFactory.genericdjango/test/client.py:67125 ms29.0%
Client.requestdjango/test/client.py:109125 ms29.0%
ClientHandler.__call__django/test/client.py:17325 ms29.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6325 ms29.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10425 ms29.0%
WhiteNoise.add_fileswhitenoise/base.py:10825 ms29.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12013 ms15.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13113 ms15.6%
WhiteNoise.get_static_filewhitenoise/base.py:2178 ms8.9%
StaticFile.__init__whitenoise/responders.py:752 ms2.2%
StaticFile.__init__whitenoise/responders.py:732 ms2.2%
StaticFile.get_headerswhitenoise/responders.py:1812 ms2.2%
StaticFile.__init__whitenoise/responders.py:742 ms2.2%
parsedate<stdlib>/email/_parseaddr.py:1852 ms2.2%
WhiteNoise.get_static_filewhitenoise/base.py:2126 ms6.7%
WhiteNoise.add_cache_headerswhitenoise/base.py:2336 ms6.7%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1766 ms6.7%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1976 ms6.7%
URLMixin.urldebug_toolbar/panels/staticfiles.py:204 ms4.5%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2354 ms4.5%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms2.2%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2142 ms2.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11511 ms13.4%
scantreewhitenoise/base.py:2719 ms11.2%
scantreewhitenoise/base.py:2719 ms11.2%
scantreewhitenoise/base.py:2719 ms11.2%
scantreewhitenoise/base.py:2719 ms11.2%
scantreewhitenoise/base.py:2718 ms8.9%
scantreewhitenoise/base.py:2738 ms8.9%
scantreewhitenoise/base.py:2732 ms2.2%
scantreewhitenoise/base.py:2732 ms2.2%
<GC>~2 ms2.2%
_patch.decoration_helper<stdlib>/unittest/mock.py:1418 arg = exit_stack.enter_context(patching)6 ms6.7%
_BaseExitStack.enter_context<stdlib>/contextlib.py:5946 ms6.7%
_patch.__enter__<stdlib>/unittest/mock.py:15724 ms4.5%
MagicMixin.__init__<stdlib>/unittest/mock.py:21864 ms4.5%
MagicMixin._mock_set_magics<stdlib>/unittest/mock.py:22094 ms4.5%
_patch.__enter__<stdlib>/unittest/mock.py:15102 ms2.2%
_patch.get_original<stdlib>/unittest/mock.py:14632 ms2.2%
resolve_name<stdlib>/pkgutil.py:4812 ms2.2%
import_module<stdlib>/importlib/__init__.py:882 ms2.2%
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentialsmastodon_auth/tests.py:139 http_get.return_value = MagicMock(status_code=200)2 ms2.2%
MagicMixin.__init__<stdlib>/unittest/mock.py:21862 ms2.2%
MagicMixin._mock_set_magics<stdlib>/unittest/mock.py:22092 ms2.2%
Estimated from 44 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
mastodon_auth/tests.py:140
instance = Instance.objects.create(
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentials
· Database
|
51 ms |
|
mastodon_auth/tests.py:148
response = self.client.post("/mastodon_login/", {"instance": "det.social"})
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentials
· Mocking
|
25 ms |
|
mastodon_auth/tests.py:139
http_get.return_value = MagicMock(status_code=200)
MastodonLoginViewTests.test_create_app_rate_limited_reuses_existing_credentials
· Mocking
|
2 ms |
Fixtures
Exact setup time| _template_string_if_invalid_marker function | 0.07 ms |
| _django_isolate_apps function | 0.06 ms |
| _django_db_marker function | 0.06 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_set_urlconf function | 0.05 ms |
| _live_server_helper function | 0.05 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.03 ms |
Database
8 queries · 3 msNo repeated queries.
Biggest pieces of work
|
call test body
mastodon_auth/tests.py:140
|
78 ms |
|
call decoration_helper
<stdlib>/unittest/mock.py:1418
|
6 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 7 hours ago | CI github-actions:test | passed | 85 ms | Profile |
| 16 hours ago | CI github-actions:test | passed | 58 ms | Profile |
| 22 hours ago | CI github-actions:test | passed | 84 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 79 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 51 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 84 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 67 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 59 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 116 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 171 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 192 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 79 ms | Run |