Tests / starter_packs/tests.py
TestPinAccountInStarterPack::test_toggle_pin_requires_ownership
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
122 ms
median 95 ms
max 285 ms
max 285 ms
Phases
Setup 6 ms
Call 115 ms
Teardown 1 ms
Categories
Database 37 ms
Factories 1 ms
Test code 0.22 ms
Other (Libraries, Unsampled, pytest, Logging, ...) 83 ms
26 database queries per run
Needs 254 KB of memory (max 912 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call67 ms98.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()60 ms87.6%
TestCase._fixture_teardowndjango/test/testcases.py:149854 ms79.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49554 ms79.2%
CursorWrapper.executedjango/db/backends/utils.py:7954 ms79.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9254 ms79.2%
CursorWrapper._executedjango/db/backends/utils.py:10354 ms79.2%
Cursor.executepsycopg/cursor.py:11354 ms79.2%
Connection.waitpsycopg/connection.py:49554 ms79.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:20654 ms79.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28654 ms79.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7854 ms79.2%
TestCase._fixture_teardowndjango/test/testcases.py:15006 ms8.3%
TestCase._rollback_atomicsdjango/test/testcases.py:14086 ms8.3%
Atomic.__exit__django/db/transaction.py:2983 ms4.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms4.2%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4313 ms4.2%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3753 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms4.2%
Cursor.executepsycopg/cursor.py:1133 ms4.2%
Connection.waitpsycopg/connection.py:4953 ms4.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms4.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms4.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms4.2%
Atomic.__exit__django/db/transaction.py:2953 ms4.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms4.2%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4133 ms4.2%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3713 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms2.1%
Cursor.executepsycopg/cursor.py:1131 ms2.1%
Connection.waitpsycopg/connection.py:4951 ms2.1%
TestPinAccountInStarterPack.test_toggle_pin_requires_ownershipstarter_packs/tests.py:1058 self.assertFalse(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)4 ms6.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:874 ms6.3%
QuerySet.getdjango/db/models/query.py:7024 ms6.3%
QuerySet.__len__django/db/models/query.py:4214 ms6.3%
QuerySet._fetch_alldjango/db/models/query.py:22624 ms6.3%
ModelIterable.__iter__django/db/models/query.py:1034 ms6.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms4.2%
Cursor.executepsycopg/cursor.py:1133 ms4.2%
Connection.waitpsycopg/connection.py:4953 ms4.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2051 ms2.1%
BaseCursor._convert_querypsycopg/_cursor_base.py:4651 ms2.1%
PostgresClientQuery.convertpsycopg/_queries.py:2891 ms2.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms2.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16121 ms2.1%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7681 ms2.1%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:891 ms2.1%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:781 ms2.1%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2731 ms2.1%
SQLCompiler.get_select.<locals>.<genexpr>django/db/models/sql/compiler.py:2781 ms2.1%
TestPinAccountInStarterPack.test_toggle_pin_requires_ownershipstarter_packs/tests.py:1056 response = self.client.post(self.pin_url(self.niche))3 ms4.2%
Client.postdjango/test/client.py:11623 ms4.2%
RequestFactory.postdjango/test/client.py:4993 ms4.2%
RequestFactory.genericdjango/test/client.py:6713 ms4.2%
Client.requestdjango/test/client.py:10913 ms4.2%
ClientHandler.__call__django/test/client.py:1731 ms2.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:631 ms2.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1041 ms2.1%
WhiteNoise.add_fileswhitenoise/base.py:1081 ms2.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1201 ms2.1%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1311 ms2.1%
WhiteNoise.get_static_filewhitenoise/base.py:2171 ms2.1%
StaticFile.__init__whitenoise/responders.py:761 ms2.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1891 ms2.1%
ClientHandler.__call__django/test/client.py:1861 ms2.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1421 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3801 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:561 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3821 ms2.1%
CSPMiddleware.process_responsecsp/middleware.py:1101 ms2.1%
teardown0.44 ms0.6%
Estimated from 56 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
starter_packs/tests.py:1058
self.assertFalse(StarterPackAccount.objects.get(starter_pack=self.starter_pack, account=self.niche).pinned)
TestPinAccountInStarterPack.test_toggle_pin_requires_ownership
· Database
|
4 ms |
|
starter_packs/tests.py:1056
response = self.client.post(self.pin_url(self.niche))
TestPinAccountInStarterPack.test_toggle_pin_requires_ownership
· Libraries
|
3 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 |
| _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
25 queries · 8 msNo repeated queries.
Biggest pieces of work
|
call _post_teardown
django/test/testcases.py:1243
|
60 ms |
|
call test body
starter_packs/tests.py:1056
|
7 ms |
| teardown pytest internals | 0.44 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 68 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 152 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 190 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 47 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 115 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 94 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 95 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 87 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 62 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 82 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 285 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 98 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 212 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 90 ms | Run |