flakytest.dev anze3db fedidevs
Tests / starter_packs/tests.py

TestOwnerManagement::test_non_owner_cannot_invite

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
133 ms
median 106 ms
max 305 ms
Phases
Setup 2 ms Call 131 ms Teardown 0.32 ms
Categories
Database 31 ms Other (Libraries, Unsampled, pytest, Deep copies, ...) 102 ms

23 database queries per run

Needs 131 KB of memory (max 1 MB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
call106 ms97.8%
TestOwnerManagement.test_non_owner_cannot_invitestarter_packs/tests.py:542 self.client.force_login(self.friend) # not an owner59 ms53.9%
ClientMixin.force_logindjango/test/client.py:85859 ms53.9%
ClientMixin._logindjango/test/client.py:88439 ms36.2%
ClientMixin.sessiondjango/test/client.py:81539 ms36.2%
SessionStore.savedjango/contrib/sessions/backends/db.py:12139 ms36.2%
SessionStore.createdjango/contrib/sessions/backends/db.py:7439 ms36.2%
SessionStore.savedjango/contrib/sessions/backends/db.py:12739 ms36.2%
Model.savedjango/db/models/base.py:90439 ms36.2%
Model.save_basedjango/db/models/base.py:99639 ms36.2%
Model._save_tabledjango/db/models/base.py:119939 ms36.2%
Model._do_insertdjango/db/models/base.py:125139 ms36.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8739 ms36.2%
QuerySet._insertdjango/db/models/query.py:214139 ms36.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:193639 ms36.2%
CursorWrapper.executedjango/db/backends/utils.py:7939 ms36.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9239 ms36.2%
CursorWrapper._executedjango/db/backends/utils.py:10539 ms36.2%
Cursor.executepsycopg/cursor.py:11339 ms36.2%
Connection.waitpsycopg/connection.py:49539 ms36.2%
ClientMixin._logindjango/test/client.py:88919 ms17.7%
logindjango/contrib/auth/__init__.py:17713 ms12.3%
SessionBase.__contains__django/contrib/sessions/backends/base.py:5213 ms12.3%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:25413 ms12.3%
SessionStore.loaddjango/contrib/sessions/backends/db.py:5513 ms12.3%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:3413 ms12.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8713 ms12.3%
QuerySet.getdjango/db/models/query.py:70213 ms12.3%
QuerySet.__len__django/db/models/query.py:42113 ms12.3%
QuerySet._fetch_alldjango/db/models/query.py:226213 ms12.3%
ModelIterable.__iter__django/db/models/query.py:10313 ms12.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162513 ms12.3%
CursorWrapper.executedjango/db/backends/utils.py:7913 ms12.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9213 ms12.3%
CursorWrapper._executedjango/db/backends/utils.py:10513 ms12.3%
Cursor.executepsycopg/cursor.py:11313 ms12.3%
Connection.waitpsycopg/connection.py:49513 ms12.3%
logindjango/contrib/auth/__init__.py:1895 ms4.6%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4374 ms3.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:743 ms3.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1263 ms2.3%
Atomic.__enter__django/db/transaction.py:2233 ms2.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms2.3%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms2.3%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms2.3%
CursorWrapper.executedjango/db/backends/utils.py:793 ms2.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms2.3%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms2.3%
Cursor.executepsycopg/cursor.py:1133 ms2.3%
Connection.waitpsycopg/connection.py:4953 ms2.3%
SessionStore.savedjango/contrib/sessions/backends/db.py:1270.84 ms0.8%
Model.savedjango/db/models/base.py:9040.84 ms0.8%
Model.save_basedjango/db/models/base.py:9960.84 ms0.8%
Model._save_tabledjango/db/models/base.py:11990.84 ms0.8%
Model._do_insertdjango/db/models/base.py:12510.84 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.84 ms0.8%
QuerySet._insertdjango/db/models/query.py:21410.84 ms0.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19360.84 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:790.84 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.84 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1050.84 ms0.8%
Cursor.executepsycopg/cursor.py:1130.84 ms0.8%
Connection.waitpsycopg/connection.py:4950.84 ms0.8%
SessionStore.createdjango/contrib/sessions/backends/db.py:700.84 ms0.8%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:2010.84 ms0.8%
SessionStore.existsdjango/contrib/sessions/backends/db.py:630.84 ms0.8%
QuerySet.existsdjango/db/models/query.py:14580.84 ms0.8%
Query.has_resultsdjango/db/models/sql/query.py:6870.84 ms0.8%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15930.84 ms0.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.84 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:790.84 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.84 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1050.84 ms0.8%
Cursor.executepsycopg/cursor.py:1130.84 ms0.8%
Connection.waitpsycopg/connection.py:4950.84 ms0.8%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4400.84 ms0.8%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1750.84 ms0.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:870.84 ms0.8%
QuerySet.getdjango/db/models/query.py:7020.84 ms0.8%
QuerySet.__len__django/db/models/query.py:4210.84 ms0.8%
QuerySet._fetch_alldjango/db/models/query.py:22620.84 ms0.8%
ModelIterable.__iter__django/db/models/query.py:1030.84 ms0.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16250.84 ms0.8%
CursorWrapper.executedjango/db/backends/utils.py:790.84 ms0.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.84 ms0.8%
CursorWrapper._executedjango/db/backends/utils.py:1050.84 ms0.8%
Cursor.executepsycopg/cursor.py:1130.84 ms0.8%
Connection.waitpsycopg/connection.py:4950.84 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.84 ms0.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.84 ms0.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.84 ms0.8%
logindjango/contrib/auth/__init__.py:1980.84 ms0.8%
Signal.senddjango/dispatch/dispatcher.py:2490.84 ms0.8%
update_last_logindjango/contrib/auth/models.py:240.84 ms0.8%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:620.84 ms0.8%
Model.savedjango/db/models/base.py:9040.84 ms0.8%
Model.save_basedjango/db/models/base.py:9960.84 ms0.8%
Model._save_tabledjango/db/models/base.py:10970.84 ms0.8%
Model._is_pk_setdjango/db/models/base.py:7110.84 ms0.8%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()29 ms27.0%
TestCase._fixture_teardowndjango/test/testcases.py:149823 ms21.6%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49523 ms21.6%
CursorWrapper.executedjango/db/backends/utils.py:7923 ms21.6%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9223 ms21.6%
CursorWrapper._executedjango/db/backends/utils.py:10323 ms21.6%
Cursor.executepsycopg/cursor.py:11323 ms21.6%
Connection.waitpsycopg/connection.py:49523 ms21.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:20623 ms21.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28623 ms21.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7823 ms21.6%
TestCase._fixture_teardowndjango/test/testcases.py:14976 ms5.4%
TestCase._should_check_constraintsdjango/test/testcases.py:15066 ms5.4%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5046 ms5.4%
Cursor.executepsycopg/cursor.py:1135 ms4.6%
Connection.waitpsycopg/connection.py:4955 ms4.6%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms4.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms3.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms3.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:3120.84 ms0.8%
TestOwnerManagement.test_non_owner_cannot_invitestarter_packs/tests.py:543 response = self.client.post(reverse("invite_owner", args=[self.pack.slug, self.friend.id]))18 ms16.9%
Client.postdjango/test/client.py:116218 ms16.9%
RequestFactory.postdjango/test/client.py:49918 ms16.9%
RequestFactory.genericdjango/test/client.py:67118 ms16.9%
Client.requestdjango/test/client.py:109118 ms16.9%
ClientHandler.__call__django/test/client.py:17314 ms13.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6314 ms13.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10414 ms13.1%
WhiteNoise.add_fileswhitenoise/base.py:10814 ms13.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12010 ms9.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13110 ms9.2%
WhiteNoise.get_static_filewhitenoise/base.py:2179 ms8.5%
StaticFile.__init__whitenoise/responders.py:727 ms6.2%
StaticFile.get_file_statswhitenoise/responders.py:1617 ms6.2%
__init____init__:-16 ms5.4%
FileEntry.__init__whitenoise/responders.py:2636 ms5.4%
FileEntry.stat_regular_filewhitenoise/responders.py:2766 ms5.4%
<GC>~6 ms5.4%
StaticFile.__init__whitenoise/responders.py:770.84 ms0.8%
StaticFile.get_alternativeswhitenoise/responders.py:2000.84 ms0.8%
StaticFile.__init__whitenoise/responders.py:750.84 ms0.8%
Headers.__getitem__<stdlib>/wsgiref/headers.py:830.84 ms0.8%
WhiteNoise.get_static_filewhitenoise/base.py:2120.84 ms0.8%
WhiteNoise.add_cache_headerswhitenoise/base.py:2330.84 ms0.8%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1760.84 ms0.8%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1970.84 ms0.8%
URLMixin.urldebug_toolbar/panels/staticfiles.py:200.84 ms0.8%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms3.9%
scantreewhitenoise/base.py:2713 ms3.1%
scantreewhitenoise/base.py:2732 ms1.5%
scantreewhitenoise/base.py:2712 ms1.5%
scantreewhitenoise/base.py:2710.84 ms0.8%
scantreewhitenoise/base.py:2710.84 ms0.8%
scantreewhitenoise/base.py:2710.84 ms0.8%
scantreewhitenoise/base.py:2730.84 ms0.8%
scantreewhitenoise/base.py:2730.84 ms0.8%
scantreewhitenoise/base.py:2690.84 ms0.8%
ClientHandler.__call__django/test/client.py:1863 ms3.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1423 ms3.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms3.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms3.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms2.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3803 ms2.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1233 ms2.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1453 ms2.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:563 ms2.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms1.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms1.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1992 ms1.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:632 ms1.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:622 ms1.5%
invite_ownerstarter_packs/views.py:4742 ms1.5%
get_editable_packstarter_packs/views.py:60 return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)2 ms1.5%
get_object_or_404django/shortcuts.py:1002 ms1.5%
QuerySet.getdjango/db/models/query.py:7022 ms1.5%
QuerySet.__len__django/db/models/query.py:4212 ms1.5%
QuerySet._fetch_alldjango/db/models/query.py:22622 ms1.5%
ModelIterable.__iter__django/db/models/query.py:1032 ms1.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16252 ms1.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms1.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms1.5%
CursorWrapper._executedjango/db/backends/utils.py:1050.84 ms0.8%
Cursor.executepsycopg/cursor.py:1130.84 ms0.8%
Connection.waitpsycopg/connection.py:4950.84 ms0.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.84 ms0.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.84 ms0.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.84 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.84 ms0.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.84 ms0.8%
CSPMiddleware.process_responsecsp/middleware.py:830.84 ms0.8%
build_policycsp/utils.py:1350.84 ms0.8%
ClientHandler.__call__django/test/client.py:2070.84 ms0.8%
HttpResponseBase.closedjango/http/response.py:3480.84 ms0.8%
Estimated from 127 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

starter_packs/tests.py:542
self.client.force_login(self.friend) # not an owner
TestOwnerManagement.test_non_owner_cannot_invite · Database
59 ms
starter_packs/tests.py:543
response = self.client.post(reverse("invite_owner", args=[self.pack.slug, self.friend.id]))
TestOwnerManagement.test_non_owner_cannot_invite · Libraries
17 ms
starter_packs/views.py:60
return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)
get_editable_pack · Database
2 ms

Fixtures

Exact setup time
_django_db_marker function 0.08 ms
_template_string_if_invalid_marker function 0.06 ms
_dj_autoclear_mailbox function 0.06 ms
_live_server_helper function 0.06 ms
_django_isolate_apps function 0.05 ms
_django_set_urlconf function 0.05 ms
_django_clear_site_cache function 0.04 ms
monkeypatch function 0.03 ms

Database

23 queries · 24 ms
No repeated queries.

Biggest pieces of work

call test body
starter_packs/tests.py:542
77 ms
call _post_teardown
django/test/testcases.py:1243
29 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
7 hours ago CI github-actions:test passed 109 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 56 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 100 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 157 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 87 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 106 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 81 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 69 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 305 ms 82997f8 main Profile
3 weeks ago CI github-actions:test passed 178 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 216 ms ab6465a main Profile
3 weeks ago CI github-actions:test passed 76 ms 0c23747 main Run