flakytest.dev anze3db flakytest
Tests / apps/orgs/tests.py

MembersTest::test_roles_and_the_last_owner

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
62 ms
median 67 ms
max 95 ms
Phases
Setup 0.67 ms Call 61 ms Teardown 1 ms
Categories
Database 33 ms Other (Libraries, Unsampled, pytest) 29 ms

45 database queries per run

Needs 40 KB of memory (max 148 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call51 ms95.2%
MembersTest.test_roles_and_the_last_ownerapps/orgs/tests.py:150 self.client.post(url, {"user": "owner", "action": "member"})28 ms52.9%
Client.postdjango/test/client.py:115328 ms52.9%
RequestFactory.postdjango/test/client.py:49928 ms52.9%
RequestFactory.genericdjango/test/client.py:67128 ms52.9%
Client.requestdjango/test/client.py:108228 ms52.9%
ClientHandler.__call__django/test/client.py:18621 ms38.8%
BaseHandler.get_responsedjango/core/handlers/base.py:14121 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13021 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12321 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
MiddlewareMixin.__call__django/utils/deprecation.py:30921 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3421 ms38.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5521 ms38.8%
BaseHandler._get_responsedjango/core/handlers/base.py:19821 ms38.8%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:5617 ms31.7%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:7917 ms31.7%
new_method_proxy.<locals>.innerdjango/utils/functional.py:25117 ms31.7%
SimpleLazyObject._setupdjango/utils/functional.py:40417 ms31.7%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:4017 ms31.7%
get_userdjango/contrib/auth/middleware.py:2017 ms31.7%
get_userdjango/contrib/auth/__init__.py:31117 ms31.7%
_get_user_session_keydjango/contrib/auth/__init__.py:9517 ms31.7%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:5517 ms31.7%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:25117 ms31.7%
SessionStore.loaddjango/contrib/sessions/backends/db.py:5517 ms31.7%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:3417 ms31.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:8717 ms31.7%
QuerySet.getdjango/db/models/query.py:63517 ms31.7%
QuerySet.__len__django/db/models/query.py:37217 ms31.7%
QuerySet._fetch_alldjango/db/models/query.py:200017 ms31.7%
ModelIterable.__iter__django/db/models/query.py:9517 ms31.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162417 ms31.7%
CursorWrapper.executedjango/db/backends/utils.py:7917 ms31.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9217 ms31.7%
CursorWrapper._executedjango/db/backends/utils.py:10517 ms31.7%
Cursor.executepsycopg/cursor.py:11317 ms31.7%
Connection.waitpsycopg/connection.py:49517 ms31.7%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:594 ms7.0%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms7.0%
membership_updateapps/orgs/views.py:2092 ms3.5%
member_organizationapps/orgs/views.py:622 ms3.5%
Organization.is_memberapps/orgs/models.py:62 return user.is_authenticated and self.membership_set.filter(user=user).exists()2 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.5%
QuerySet.filterdjango/db/models/query.py:15422 ms3.5%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms3.5%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms3.5%
Query.add_qdjango/db/models/sql/query.py:16712 ms3.5%
Query._add_qdjango/db/models/sql/query.py:17032 ms3.5%
Query.build_filterdjango/db/models/sql/query.py:16072 ms3.5%
Query._get_coldjango/db/models/sql/query.py:4512 ms3.5%
membership_updateapps/orgs/views.py:228 messages.error(request, "An organization needs an owner: make someone else an owner first.")2 ms3.5%
errordjango/contrib/messages/api.py:1192 ms3.5%
SysMonitor.sysmon_py_startcoverage/sysmon.py:3702 ms3.5%
ClientHandler.__call__django/test/client.py:1738 ms14.1%
BaseHandler.load_middlewaredjango/core/handlers/base.py:628 ms14.1%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1048 ms14.1%
WhiteNoise.add_fileswhitenoise/base.py:1088 ms14.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1206 ms10.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms10.6%
WhiteNoise.get_static_filewhitenoise/base.py:2086 ms10.6%
StaticFile.__init__whitenoise/responders.py:734 ms7.0%
StaticFile.get_headerswhitenoise/responders.py:1782 ms3.5%
StaticFile.get_headerswhitenoise/responders.py:1702 ms3.5%
StaticFile.__init__whitenoise/responders.py:752 ms3.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms3.5%
scantreewhitenoise/base.py:2622 ms3.5%
scantreewhitenoise/base.py:2622 ms3.5%
scantreewhitenoise/base.py:2602 ms3.5%
MembersTest.test_roles_and_the_last_ownerapps/orgs/tests.py:147 self.client.force_login(self.owner)8 ms14.1%
ClientMixin.force_logindjango/test/client.py:8558 ms14.1%
ClientMixin._logindjango/test/client.py:8816 ms10.6%
logindjango/contrib/auth/__init__.py:1874 ms7.0%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4342 ms3.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms3.5%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms3.5%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms3.5%
QuerySet.existsdjango/db/models/query.py:13372 ms3.5%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms3.5%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4372 ms3.5%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1752 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.5%
QuerySet.getdjango/db/models/query.py:6352 ms3.5%
QuerySet.__len__django/db/models/query.py:3722 ms3.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.5%
ModelIterable.__iter__django/db/models/query.py:952 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
logindjango/contrib/auth/__init__.py:1972 ms3.5%
Signal.senddjango/dispatch/dispatcher.py:2092 ms3.5%
update_last_logindjango/contrib/auth/models.py:242 ms3.5%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms3.5%
Model.savedjango/db/models/base.py:8742 ms3.5%
Model.save_basedjango/db/models/base.py:9662 ms3.5%
Model._save_tabledjango/db/models/base.py:11102 ms3.5%
Model._do_updatedjango/db/models/base.py:12112 ms3.5%
QuerySet._updatedjango/db/models/query.py:13272 ms3.5%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms3.5%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
ClientMixin._logindjango/test/client.py:8762 ms3.5%
ClientMixin.sessiondjango/test/client.py:8122 ms3.5%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms3.5%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms3.5%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms3.5%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms3.5%
QuerySet.existsdjango/db/models/query.py:13372 ms3.5%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms3.5%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
MembersTest.test_roles_and_the_last_ownerapps/orgs/tests.py:153 self.client.post(url, {"user": "member", "action": "owner"})8 ms14.1%
Client.postdjango/test/client.py:11538 ms14.1%
RequestFactory.postdjango/test/client.py:4996 ms10.6%
RequestFactory.genericdjango/test/client.py:6716 ms10.6%
Client.requestdjango/test/client.py:10826 ms10.6%
ClientHandler.__call__django/test/client.py:1866 ms10.6%
BaseHandler.get_responsedjango/core/handlers/base.py:1416 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1306 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:346 ms10.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms10.6%
BaseHandler._get_responsedjango/core/handlers/base.py:1986 ms10.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:594 ms7.0%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms7.0%
membership_updateapps/orgs/views.py:2092 ms3.5%
member_organizationapps/orgs/views.py:59 organization = get_object_or_404(Organization, slug=org_slug)2 ms3.5%
get_object_or_404django/shortcuts.py:902 ms3.5%
QuerySet.getdjango/db/models/query.py:6352 ms3.5%
QuerySet.__len__django/db/models/query.py:3722 ms3.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.5%
ModelIterable.__iter__django/db/models/query.py:952 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
membership_updateapps/orgs/views.py:231 membership.save(update_fields=["role"])2 ms3.5%
Model.savedjango/db/models/base.py:8742 ms3.5%
Model.save_basedjango/db/models/base.py:9662 ms3.5%
Model._save_tabledjango/db/models/base.py:11102 ms3.5%
Model._do_updatedjango/db/models/base.py:12112 ms3.5%
QuerySet._updatedjango/db/models/query.py:13272 ms3.5%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms3.5%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms3.5%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms3.5%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms3.5%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms3.5%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms3.5%
get_userdjango/contrib/auth/middleware.py:202 ms3.5%
get_userdjango/contrib/auth/__init__.py:3112 ms3.5%
_get_user_session_keydjango/contrib/auth/__init__.py:952 ms3.5%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms3.5%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms3.5%
SessionStore.loaddjango/contrib/sessions/backends/db.py:562 ms3.5%
SessionBase.decodedjango/contrib/sessions/backends/base.py:1352 ms3.5%
loadsdjango/core/signing.py:1712 ms3.5%
Signer.unsign_objectdjango/core/signing.py:2442 ms3.5%
TimestampSigner.unsigndjango/core/signing.py:2682 ms3.5%
Signer.unsigndjango/core/signing.py:2122 ms3.5%
Signer.signaturedjango/core/signing.py:2022 ms3.5%
base64_hmacdjango/core/signing.py:1012 ms3.5%
salted_hmacdjango/utils/crypto.py:452 ms3.5%
force_bytesdjango/utils/encoding.py:1042 ms3.5%
MembersTest.test_roles_and_the_last_ownerapps/orgs/tests.py:154 self.client.post(url, {"user": "owner", "action": "member"})4 ms7.0%
Client.postdjango/test/client.py:11534 ms7.0%
RequestFactory.postdjango/test/client.py:4994 ms7.0%
RequestFactory.genericdjango/test/client.py:6714 ms7.0%
Client.requestdjango/test/client.py:10824 ms7.0%
ClientHandler.__call__django/test/client.py:1864 ms7.0%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms7.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms7.0%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms7.0%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms3.5%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms3.5%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms3.5%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms3.5%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms3.5%
get_userdjango/contrib/auth/middleware.py:202 ms3.5%
get_userdjango/contrib/auth/__init__.py:3112 ms3.5%
_get_user_session_keydjango/contrib/auth/__init__.py:952 ms3.5%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:552 ms3.5%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms3.5%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms3.5%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms3.5%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms3.5%
QuerySet.getdjango/db/models/query.py:6352 ms3.5%
QuerySet.__len__django/db/models/query.py:3722 ms3.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms3.5%
ModelIterable.__iter__django/db/models/query.py:952 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms3.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms3.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms3.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:592 ms3.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:642 ms3.5%
membership_updateapps/orgs/views.py:2092 ms3.5%
member_organizationapps/orgs/views.py:622 ms3.5%
Organization.is_memberapps/orgs/models.py:62 return user.is_authenticated and self.membership_set.filter(user=user).exists()2 ms3.5%
QuerySet.existsdjango/db/models/query.py:13372 ms3.5%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms3.5%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms3.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
MembersTest.test_roles_and_the_last_ownerapps/orgs/tests.py:155 owner.refresh_from_db()2 ms3.5%
Model.refresh_from_dbdjango/db/models/base.py:7392 ms3.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms3.5%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms3.5%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4842 ms3.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms3.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms3.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms3.5%
Cursor.executepsycopg/cursor.py:1132 ms3.5%
Connection.waitpsycopg/connection.py:4952 ms3.5%
teardown2 ms3.8%
TestCase.tearDownClassdjango/test/testcases.py:1455 conn.close()2 ms3.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms3.8%
BaseDatabaseWrapper.closedjango/db/backends/base/base.py:3552 ms3.8%
DatabaseWrapper._closedjango/db/backends/postgresql/base.py:3962 ms3.8%
Connection.closepsycopg/connection.py:2012 ms3.8%
Estimated from 29 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/orgs/tests.py:150
self.client.post(url, {"user": "owner", "action": "member"})
MembersTest.test_roles_and_the_last_owner · Database
25 ms
apps/orgs/tests.py:147
self.client.force_login(self.owner)
MembersTest.test_roles_and_the_last_owner · Database
8 ms
apps/orgs/models.py:62
return user.is_authenticated and self.membership_set.filter(user=user).exists()
Organization.is_member · Database
4 ms
apps/orgs/tests.py:153
self.client.post(url, {"user": "member", "action": "owner"})
MembersTest.test_roles_and_the_last_owner · Libraries
4 ms
apps/orgs/views.py:228
messages.error(request, "An organization needs an owner: make someone else an owner first.")
membership_update · Libraries
2 ms
apps/orgs/views.py:59
organization = get_object_or_404(Organization, slug=org_slug)
member_organization · Database
2 ms
apps/orgs/views.py:231
membership.save(update_fields=["role"])
membership_update · Database
2 ms
apps/orgs/tests.py:154
self.client.post(url, {"user": "owner", "action": "member"})
MembersTest.test_roles_and_the_last_owner · Database
2 ms
apps/orgs/tests.py:155
owner.refresh_from_db()
MembersTest.test_roles_and_the_last_owner · Database
2 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_django_db_marker function 0.03 ms
_template_string_if_invalid_marker 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

45 queries · 12 ms

Repeated queries are usually N+1 lookups: fetch them once with select_related / prefetch_related (or selectinload).

4×
SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > %s AND "django_session"."session_key" = %s) LIMIT ?
3×
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "a…
3×
SELECT "orgs_organization"."id", "orgs_organization"."name", "orgs_organization"."slug", "orgs_organization"."created_by_id", "orgs_organization"."date_created" FROM "orgs_organization" WHERE "orgs_organization"."slug" = %s LIMIT ?
3×
SELECT %s AS "a" FROM "orgs_membership" WHERE ("orgs_membership"."organization_id" = %s AND "orgs_membership"."user_id" = %s) LIMIT ?
3×
SELECT "orgs_membership"."id", "orgs_membership"."organization_id", "orgs_membership"."user_id", "orgs_membership"."role", "orgs_membership"."date_created" FROM "orgs_membership" INNER JOIN "auth_user" ON ("orgs_membership"."user_id" = "auth_user"."id") WHERE ("orgs_membership"."organization_id" = …

Biggest pieces of work

call test body
apps/orgs/tests.py:150
49 ms
teardown tearDownClass
django/test/testcases.py:1455
2 ms
call _post_teardown
django/test/testcases.py:1240
2 ms

Reliability

15 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 15 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 54 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 77 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 40 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 95 ms e141198 main Profile
1 month ago CI github-actions:test passed 35 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 60 ms afde85b main Profile
1 month ago CI github-actions:test passed 50 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 78 ms 044719a main Profile
1 month ago CI github-actions:test passed 39 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 93 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 68 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 67 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 72 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 43 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 67 ms 78a4357 main Profile