Tests / starter_packs/tests.py
TestOwnerManagement::test_invite_creates_pending_invitation_not_owner
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
170 ms
median 129 ms
max 322 ms
max 322 ms
Phases
Setup 7 ms
Call 162 ms
Teardown 0.38 ms
Categories
Database 68 ms
Test code 0.33 ms
Factories 0.26 ms
Other (Libraries, Unsampled, pytest, Templates, ...) 102 ms
34 database queries per run
Needs 84 KB of memory (max 332 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup0.90 ms1.1%
call80 ms98.6%
TestOwnerManagement.test_invite_creates_pending_invitation_not_ownerstarter_packs/tests.py:494 self.assertFalse(self.pack.owners.filter(pk=self.friend.pk).exists())67 ms82.8%
QuerySet.existsdjango/db/models/query.py:145867 ms82.8%
Query.has_resultsdjango/db/models/sql/query.py:68767 ms82.8%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:159367 ms82.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162567 ms82.8%
CursorWrapper.executedjango/db/backends/utils.py:7967 ms82.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9267 ms82.8%
CursorWrapper._executedjango/db/backends/utils.py:10567 ms82.8%
Cursor.executepsycopg/cursor.py:11367 ms82.8%
Connection.waitpsycopg/connection.py:49567 ms82.8%
TestOwnerManagement.test_invite_creates_pending_invitation_not_ownerstarter_packs/tests.py:490 self.client.force_login(self.owner)6 ms7.1%
ClientMixin.force_logindjango/test/client.py:8586 ms7.1%
ClientMixin._logindjango/test/client.py:8842 ms2.9%
ClientMixin.sessiondjango/test/client.py:8152 ms2.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms2.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:701 ms1.4%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2011 ms1.4%
SessionStore.existsdjango/contrib/sessions/backends/db.py:631 ms1.4%
QuerySet.existsdjango/db/models/query.py:14581 ms1.4%
Query.has_resultsdjango/db/models/sql/query.py:6871 ms1.4%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15931 ms1.4%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
SessionStore.createdjango/contrib/sessions/backends/db.py:741 ms1.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1271 ms1.4%
Model.savedjango/db/models/base.py:9041 ms1.4%
Model.save_basedjango/db/models/base.py:9961 ms1.4%
Model._save_tabledjango/db/models/base.py:11991 ms1.4%
Model._do_insertdjango/db/models/base.py:12511 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms1.4%
QuerySet._insertdjango/db/models/query.py:21411 ms1.4%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
ClientMixin._logindjango/test/client.py:8831 ms1.4%
__init____init__:-11 ms1.4%
HttpRequest.__init__django/http/request.py:681 ms1.4%
QueryDict.__init__django/http/request.py:6171 ms1.4%
parse_qsl<stdlib>/urllib/parse.py:9371 ms1.4%
ClientMixin._logindjango/test/client.py:8891 ms1.4%
logindjango/contrib/auth/__init__.py:1981 ms1.4%
Signal.senddjango/dispatch/dispatcher.py:2491 ms1.4%
update_last_logindjango/contrib/auth/models.py:241 ms1.4%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:621 ms1.4%
Model.savedjango/db/models/base.py:9041 ms1.4%
Model.save_basedjango/db/models/base.py:9961 ms1.4%
Model._save_tabledjango/db/models/base.py:11401 ms1.4%
Model._do_updatedjango/db/models/base.py:12211 ms1.4%
ClientMixin._logindjango/test/client.py:8911 ms1.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1261 ms1.4%
Atomic.__exit__django/db/transaction.py:2591 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms1.4%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4311 ms1.4%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3751 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
TestOwnerManagement.test_invite_creates_pending_invitation_not_ownerstarter_packs/tests.py:491 response = self.client.post(reverse("invite_owner", args=[self.pack.slug, self.friend.id]))3 ms4.3%
Client.postdjango/test/client.py:11623 ms4.3%
RequestFactory.postdjango/test/client.py:4993 ms4.3%
RequestFactory.genericdjango/test/client.py:6713 ms4.3%
Client.requestdjango/test/client.py:10913 ms4.3%
ClientHandler.__call__django/test/client.py:1733 ms4.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:633 ms4.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1043 ms4.3%
WhiteNoise.add_fileswhitenoise/base.py:1083 ms4.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms4.3%
scantreewhitenoise/base.py:2713 ms4.3%
scantreewhitenoise/base.py:2713 ms4.3%
scantreewhitenoise/base.py:2733 ms4.3%
TestOwnerManagement.test_invite_creates_pending_invitation_not_ownerstarter_packs/tests.py:495 self.assertTrue(self.pack.invitations.filter(invited_user=self.friend, invited_by=self.owner).exists())2 ms2.9%
QuerySet.existsdjango/db/models/query.py:14582 ms2.9%
Query.has_resultsdjango/db/models/sql/query.py:6872 ms2.9%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15932 ms2.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms2.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.9%
Cursor.executepsycopg/cursor.py:1132 ms2.9%
Connection.waitpsycopg/connection.py:4952 ms2.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms1.4%
TestCase._fixture_teardowndjango/test/testcases.py:14981 ms1.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4951 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:791 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms1.4%
Cursor.executepsycopg/cursor.py:1131 ms1.4%
Connection.waitpsycopg/connection.py:4951 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms1.4%
Estimated from 70 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
starter_packs/tests.py:494
self.assertFalse(self.pack.owners.filter(pk=self.friend.pk).exists())
TestOwnerManagement.test_invite_creates_pending_invitation_not_owner
· Database
|
67 ms |
|
starter_packs/tests.py:490
self.client.force_login(self.owner)
TestOwnerManagement.test_invite_creates_pending_invitation_not_owner
· Database
|
6 ms |
|
starter_packs/tests.py:491
response = self.client.post(reverse("invite_owner", args=[self.pack.slug, self.friend.id]))
TestOwnerManagement.test_invite_creates_pending_invitation_not_owner
· Libraries
|
3 ms |
|
starter_packs/tests.py:495
self.assertTrue(self.pack.invitations.filter(invited_user=self.friend, invited_by=self.owner).exists())
TestOwnerManagement.test_invite_creates_pending_invitation_not_owner
· Database
|
2 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 |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
33 queries · 14 msNo repeated queries.
Biggest pieces of work
|
call test body
starter_packs/tests.py:494
|
79 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
1 ms |
| setup pytest internals | 0.90 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 | 81 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 175 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 95 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 95 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 129 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 136 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 261 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 110 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 91 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 102 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 322 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 299 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 315 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 101 ms | Run |