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

MembersTest::test_members_can_leave

First seen 8 hours ago in 78a4357
CI github-actions:test 5 runs
Average
46 ms
median 51 ms
max 54 ms
Phases
Setup 0.75 ms Call 45 ms Teardown 0.16 ms
Categories
Database 21 ms Other (Libraries, Unsampled, pytest) 25 ms

28 database queries per run

Needs 110 KB of memory (max 248 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, an hour ago · open run
Hide pytest frames
setup0.83 ms1.6%
CallInfo.from_call_pytest/runner.py:3530.83 ms1.6%
call_and_report.<locals>.<lambda>_pytest/runner.py:2450.83 ms1.6%
HookCaller.__call__pluggy/_hooks.py:5120.83 ms1.6%
PluginManager._hookexecpluggy/_manager.py:1200.83 ms1.6%
_multicallpluggy/_callers.py:1210.83 ms1.6%
pytest_runtest_setup_pytest/runner.py:1650.83 ms1.6%
SetupState.setup_pytest/runner.py:5230.83 ms1.6%
TestCaseFunction.setup_pytest/unittest.py:2270.83 ms1.6%
Function.setup_pytest/python.py:17230.83 ms1.6%
TopRequest._fillfixtures_pytest/fixtures.py:7070.83 ms1.6%
FixtureRequest.getfixturevalue_pytest/fixtures.py:5390.83 ms1.6%
FixtureRequest._get_active_fixturedef_pytest/fixtures.py:6270.83 ms1.6%
FixtureDef.execute_pytest/fixtures.py:11100.83 ms1.6%
HookCaller.__call__pluggy/_hooks.py:5120.83 ms1.6%
PluginManager._hookexecpluggy/_manager.py:1200.83 ms1.6%
_multicallpluggy/_callers.py:1100.83 ms1.6%
call50 ms98.0%
CallInfo.from_call_pytest/runner.py:35350 ms98.0%
call_and_report.<locals>.<lambda>_pytest/runner.py:24550 ms98.0%
HookCaller.__call__pluggy/_hooks.py:51250 ms98.0%
PluginManager._hookexecpluggy/_manager.py:12050 ms98.0%
_multicallpluggy/_callers.py:12150 ms98.0%
pytest_runtest_call_pytest/runner.py:17950 ms98.0%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:57350 ms98.0%
SimpleTestCase.__call__django/test/testcases.py:31350 ms98.0%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36846 ms89.8%
TestCase.__call__<stdlib>/unittest/case.py:74746 ms89.8%
TestCase.run<stdlib>/unittest/case.py:69146 ms89.8%
TestCase._callTestMethod<stdlib>/unittest/case.py:63746 ms89.8%
MembersTest.test_members_can_leaveapps/orgs/tests.py:160 response = self.client.post(reverse("membership_update", args=["acme"]), {"user": "member", "action": "remove"})29 ms57.2%
Client.postdjango/test/client.py:115329 ms57.2%
RequestFactory.postdjango/test/client.py:49929 ms57.2%
RequestFactory.genericdjango/test/client.py:67129 ms57.2%
Client.requestdjango/test/client.py:108229 ms57.2%
ClientHandler.__call__django/test/client.py:17323 ms44.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6223 ms44.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10423 ms44.9%
WhiteNoise.add_fileswhitenoise/base.py:10823 ms44.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12017 ms32.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13115 ms28.6%
WhiteNoise.get_static_filewhitenoise/base.py:20815 ms28.6%
StaticFile.__init__whitenoise/responders.py:778 ms16.3%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms8.2%
__init____init__:-14 ms8.2%
Headers.__init__<stdlib>/wsgiref/headers.py:364 ms8.2%
<GC>~4 ms8.2%
StaticFile.get_alternativeswhitenoise/responders.py:2014 ms8.2%
StaticFile.__init__whitenoise/responders.py:736 ms12.2%
StaticFile.get_headerswhitenoise/responders.py:1766 ms12.2%
formatdate<stdlib>/email/utils.py:2666 ms12.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms8.2%
scantreewhitenoise/base.py:2622 ms4.1%
scantreewhitenoise/base.py:2622 ms4.1%
scantreewhitenoise/base.py:2642 ms4.1%
ClientHandler.__call__django/test/client.py:1866 ms12.2%
BaseHandler.get_responsedjango/core/handlers/base.py:1416 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1306 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:346 ms12.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms12.2%
BaseHandler._get_responsedjango/core/handlers/base.py:1986 ms12.2%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:594 ms8.2%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms8.2%
membership_updateapps/orgs/views.py:2094 ms8.2%
member_organizationapps/orgs/views.py:59 organization = get_object_or_404(Organization, slug=org_slug)2 ms4.1%
get_object_or_404django/shortcuts.py:902 ms4.1%
QuerySet.getdjango/db/models/query.py:6352 ms4.1%
QuerySet.__len__django/db/models/query.py:3722 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.1%
ModelIterable.__iter__django/db/models/query.py:952 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
member_organizationapps/orgs/views.py:622 ms4.1%
Organization.is_memberapps/orgs/models.py:62 return user.is_authenticated and self.membership_set.filter(user=user).exists()2 ms4.1%
QuerySet.existsdjango/db/models/query.py:13372 ms4.1%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:562 ms4.1%
login_required.<locals>.<lambda>django/contrib/auth/decorators.py:792 ms4.1%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2512 ms4.1%
SimpleLazyObject._setupdjango/utils/functional.py:4042 ms4.1%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:402 ms4.1%
get_userdjango/contrib/auth/middleware.py:202 ms4.1%
get_userdjango/contrib/auth/__init__.py:3182 ms4.1%
ModelBackend.get_userdjango/contrib/auth/backends.py:2322 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet.getdjango/db/models/query.py:6352 ms4.1%
QuerySet.__len__django/db/models/query.py:3722 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.1%
ModelIterable.__iter__django/db/models/query.py:952 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.1%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:9382 ms4.1%
MembersTest.test_members_can_leaveapps/orgs/tests.py:159 self.client.force_login(self.member)15 ms28.6%
ClientMixin.force_logindjango/test/client.py:85515 ms28.6%
ClientMixin._logindjango/test/client.py:8818 ms16.3%
logindjango/contrib/auth/__init__.py:1874 ms8.2%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4344 ms8.2%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms4.1%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms4.1%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms4.1%
QuerySet.existsdjango/db/models/query.py:13372 ms4.1%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms4.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms4.1%
Atomic.__exit__django/db/transaction.py:2472 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
logindjango/contrib/auth/__init__.py:1752 ms4.1%
SessionBase.__contains__django/contrib/sessions/backends/base.py:522 ms4.1%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2512 ms4.1%
SessionStore.loaddjango/contrib/sessions/backends/db.py:552 ms4.1%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:342 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet.getdjango/db/models/query.py:6352 ms4.1%
QuerySet.__len__django/db/models/query.py:3722 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.1%
ModelIterable.__iter__django/db/models/query.py:952 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
logindjango/contrib/auth/__init__.py:1972 ms4.1%
Signal.senddjango/dispatch/dispatcher.py:2092 ms4.1%
update_last_logindjango/contrib/auth/models.py:242 ms4.1%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms4.1%
Model.savedjango/db/models/base.py:8742 ms4.1%
Model.save_basedjango/db/models/base.py:9662 ms4.1%
Model._save_tabledjango/db/models/base.py:11102 ms4.1%
Model._do_updatedjango/db/models/base.py:12112 ms4.1%
QuerySet._updatedjango/db/models/query.py:13272 ms4.1%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms4.1%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
ClientMixin._logindjango/test/client.py:8764 ms8.2%
ClientMixin.sessiondjango/test/client.py:8124 ms8.2%
SessionStore.savedjango/contrib/sessions/backends/db.py:1214 ms8.2%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms4.1%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms4.1%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms4.1%
QuerySet.existsdjango/db/models/query.py:13372 ms4.1%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.1%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7952 ms4.1%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5742 ms4.1%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms4.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms4.1%
Model.savedjango/db/models/base.py:8742 ms4.1%
Model.save_basedjango/db/models/base.py:9662 ms4.1%
Model._save_tabledjango/db/models/base.py:11672 ms4.1%
Model._do_insertdjango/db/models/base.py:12182 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet._insertdjango/db/models/query.py:19182 ms4.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
ClientMixin._logindjango/test/client.py:8832 ms4.1%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms4.1%
Model.savedjango/db/models/base.py:8742 ms4.1%
Model.save_basedjango/db/models/base.py:9662 ms4.1%
Model._save_tabledjango/db/models/base.py:11102 ms4.1%
Model._do_updatedjango/db/models/base.py:12112 ms4.1%
QuerySet._updatedjango/db/models/query.py:13272 ms4.1%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms4.1%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
MembersTest.test_members_can_leaveapps/orgs/tests.py:1622 ms4.1%
Organization.is_memberapps/orgs/models.py:62 return user.is_authenticated and self.membership_set.filter(user=user).exists()2 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet.filterdjango/db/models/query.py:15422 ms4.1%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms4.1%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms4.1%
Query.add_qdjango/db/models/sql/query.py:16712 ms4.1%
Query._add_qdjango/db/models/sql/query.py:17032 ms4.1%
Query.build_filterdjango/db/models/sql/query.py:16132 ms4.1%
Query.build_lookupdjango/db/models/sql/query.py:14302 ms4.1%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3714 ms8.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms8.2%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms4.1%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms4.1%
Atomic.__exit__django/db/transaction.py:2862 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
Estimated from 25 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

apps/orgs/tests.py:160
response = self.client.post(reverse("membership_update", args=["acme"]), {"user": "member", "action": "remove"})
MembersTest.test_members_can_leave · Libraries
25 ms
apps/orgs/tests.py:159
self.client.force_login(self.member)
MembersTest.test_members_can_leave · Database
15 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/views.py:59
organization = get_object_or_404(Organization, slug=org_slug)
member_organization · Database
2 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.08 ms
_dj_autoclear_mailbox function 0.05 ms
_django_db_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.03 ms
monkeypatch function 0.02 ms

Database

28 queries · 9 ms
No repeated queries.

Biggest pieces of work

call test body
apps/orgs/tests.py:160
46 ms
call _post_teardown
django/test/testcases.py:1240
4 ms
setup pytest internals 0.83 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
an hour ago CI github-actions:test passed 51 ms 9caa567 main Profile
an hour ago CI github-actions:test passed 51 ms ec75501 main Profile
8 hours ago CI github-actions:test passed 54 ms d2c12e5 main Profile
8 hours ago CI github-actions:test passed 25 ms 0b902f6 main Profile
8 hours ago CI github-actions:test passed 49 ms 78a4357 main Profile