flakytest.dev anze3db flakytest
Tests / ft/tests.py

TestTrubleshootingPage::test_troubleshooting_with_project

First seen 2 years, 11 months ago in b9e98d9
CI github-actions:test 15 runs
Average
50 ms
median 53 ms
max 73 ms
Phases
Setup 0.68 ms Call 48 ms Teardown 0.84 ms
Categories
Database 26 ms App code 0.16 ms Test code 0.16 ms Password hashing 0.14 ms Other (Libraries, Templates, Unsampled, pytest) 23 ms

36 database queries per run

Needs 400 KB of memory (max 808 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call38 ms97.2%
TestTrubleshootingPage.test_troubleshooting_with_projectft/tests.py:113 response = self.client.get(project.url("project_troubleshooting"))14 ms34.3%
Client.getdjango/test/client.py:112414 ms34.3%
RequestFactory.getdjango/test/client.py:47514 ms34.3%
RequestFactory.genericdjango/test/client.py:67114 ms34.3%
Client.requestdjango/test/client.py:108211 ms28.6%
ClientHandler.__call__django/test/client.py:1867 ms17.2%
BaseHandler.get_responsedjango/core/handlers/base.py:1417 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1307 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1237 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3097 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:347 ms17.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:557 ms17.2%
BaseHandler._get_responsedjango/core/handlers/base.py:1987 ms17.2%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:597 ms17.2%
project_troubleshootingapps/projects/urls.py:6227 ms17.2%
managed_projectapps/projects/urls.py:61 project = get_object_or_404(5 ms11.4%
get_object_or_404django/shortcuts.py:905 ms11.4%
QuerySet.getdjango/db/models/query.py:6252 ms5.7%
QuerySet.filterdjango/db/models/query.py:15422 ms5.7%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms5.7%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms5.7%
Query.add_qdjango/db/models/sql/query.py:16712 ms5.7%
Query._add_qdjango/db/models/sql/query.py:17032 ms5.7%
Query.build_filterdjango/db/models/sql/query.py:15992 ms5.7%
QuerySet.getdjango/db/models/query.py:6352 ms5.7%
QuerySet.__len__django/db/models/query.py:3722 ms5.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.7%
ModelIterable.__iter__django/db/models/query.py:952 ms5.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
managed_projectapps/projects/urls.py:642 ms5.7%
can_manageapps/projects/urls.py:442 ms5.7%
can_manage_projectapps/projects/urls.py:40 return user.is_superuser or project.organization.membership_set.filter(user=user).exists()2 ms5.7%
QuerySet.existsdjango/db/models/query.py:13372 ms5.7%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms5.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms5.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
ClientHandler.__call__django/test/client.py:1735 ms11.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:625 ms11.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:1045 ms11.4%
WhiteNoise.add_fileswhitenoise/base.py:1085 ms11.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms5.7%
scantreewhitenoise/base.py:2622 ms5.7%
scantreewhitenoise/base.py:2622 ms5.7%
scantreewhitenoise/base.py:2622 ms5.7%
scantreewhitenoise/base.py:2622 ms5.7%
scantreewhitenoise/base.py:2622 ms5.7%
scantreewhitenoise/base.py:2642 ms5.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1202 ms5.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1312 ms5.7%
WhiteNoise.get_static_filewhitenoise/base.py:2082 ms5.7%
StaticFile.__init__whitenoise/responders.py:722 ms5.7%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms5.7%
__init____init__:-12 ms5.7%
FileEntry.__init__whitenoise/responders.py:2632 ms5.7%
FileEntry.stat_regular_filewhitenoise/responders.py:2762 ms5.7%
Client.requestdjango/test/client.py:10972 ms5.7%
TestTrubleshootingPage.test_troubleshooting_with_projectft/tests.py:109 self.client.force_login(user)11 ms28.6%
ClientMixin.force_logindjango/test/client.py:85511 ms28.6%
ClientMixin._logindjango/test/client.py:8817 ms17.2%
logindjango/contrib/auth/__init__.py:1875 ms11.4%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:4345 ms11.4%
SessionStore.createdjango/contrib/sessions/backends/db.py:702 ms5.7%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1982 ms5.7%
SessionStore.existsdjango/contrib/sessions/backends/db.py:632 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms5.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms5.7%
Atomic.__exit__django/db/transaction.py:2472 ms5.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms5.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
logindjango/contrib/auth/__init__.py:1972 ms5.7%
Signal.senddjango/dispatch/dispatcher.py:2092 ms5.7%
update_last_logindjango/contrib/auth/models.py:242 ms5.7%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:10862 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
BaseManager.get_querysetdjango/db/models/manager.py:1552 ms5.7%
ClientMixin._logindjango/test/client.py:8762 ms5.7%
ClientMixin.sessiondjango/test/client.py:8122 ms5.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms5.7%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms5.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:11672 ms5.7%
Model._do_insertdjango/db/models/base.py:12182 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet._insertdjango/db/models/query.py:19182 ms5.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
ClientMixin._logindjango/test/client.py:8832 ms5.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1272 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:11102 ms5.7%
Model._do_updatedjango/db/models/base.py:12112 ms5.7%
QuerySet._updatedjango/db/models/query.py:13272 ms5.7%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms5.7%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms5.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
TestTrubleshootingPage.test_troubleshooting_with_projectft/tests.py:1105 ms11.4%
make_projectapps/projects/testing.py:61 organization = Organization.objects.create(2 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet.createdjango/db/models/query.py:6692 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:11672 ms5.7%
Model._do_insertdjango/db/models/base.py:12182 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet._insertdjango/db/models/query.py:19182 ms5.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
make_projectapps/projects/testing.py:64 project = Project.objects.create(2 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet.createdjango/db/models/query.py:6692 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:11672 ms5.7%
Model._do_insertdjango/db/models/base.py:12182 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet._insertdjango/db/models/query.py:19182 ms5.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
TestTrubleshootingPage.test_troubleshooting_with_projectft/tests.py:1125 ms11.4%
add_memberapps/projects/testing.py:76 membership, _ = Membership.objects.get_or_create(5 ms11.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms11.4%
QuerySet.get_or_createdjango/db/models/query.py:9872 ms5.7%
QuerySet.getdjango/db/models/query.py:6352 ms5.7%
QuerySet.__len__django/db/models/query.py:3722 ms5.7%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.7%
ModelIterable.__iter__django/db/models/query.py:952 ms5.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms5.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7952 ms5.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms5.7%
WhereNode.as_sqldjango/db/models/sql/where.py:1512 ms5.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5782 ms5.7%
RelatedLookupMixin.as_sqldjango/db/models/fields/related_lookups.py:1282 ms5.7%
QuerySet.get_or_createdjango/db/models/query.py:9922 ms5.7%
Atomic.__exit__django/db/transaction.py:2472 ms5.7%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.7%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms5.7%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
TestTrubleshootingPage.test_troubleshooting_with_projectft/tests.py:108 user = User.objects.create_user("testuser")2 ms5.7%
UserManager.create_userdjango/contrib/auth/models.py:1752 ms5.7%
UserManager._create_userdjango/contrib/auth/models.py:1632 ms5.7%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms5.7%
Model.savedjango/db/models/base.py:8742 ms5.7%
Model.save_basedjango/db/models/base.py:9662 ms5.7%
Model._save_tabledjango/db/models/base.py:11672 ms5.7%
Model._do_insertdjango/db/models/base.py:12182 ms5.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms5.7%
QuerySet._insertdjango/db/models/query.py:19182 ms5.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms5.7%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms5.7%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms5.7%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.7%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.7%
Cursor.executepsycopg/cursor.py:1132 ms5.7%
Connection.waitpsycopg/connection.py:4952 ms5.7%
Estimated from 17 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

ft/tests.py:109
self.client.force_login(user)
TestTrubleshootingPage.test_troubleshooting_with_project · Database
11 ms
ft/tests.py:113
response = self.client.get(project.url("project_troubleshooting"))
TestTrubleshootingPage.test_troubleshooting_with_project · Libraries
7 ms
apps/projects/testing.py:76
membership, _ = Membership.objects.get_or_create(
add_member · Database
5 ms
apps/projects/urls.py:61
project = get_object_or_404(
managed_project · Database
5 ms
ft/tests.py:108
user = User.objects.create_user("testuser")
TestTrubleshootingPage.test_troubleshooting_with_project · Database
2 ms
apps/projects/testing.py:61
organization = Organization.objects.create(
make_project · Database
2 ms
apps/projects/testing.py:64
project = Project.objects.create(
make_project · Database
2 ms
apps/projects/urls.py:40
return user.is_superuser or project.organization.membership_set.filter(user=user).exists()
can_manage_project · 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
_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

36 queries · 7 ms
No repeated queries.

Biggest pieces of work

call test body
ft/tests.py:108
36 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 39 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 63 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 30 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 63 ms e141198 main Profile
1 month ago CI github-actions:test passed 30 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 49 ms afde85b main Profile
1 month ago CI github-actions:test passed 41 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 73 ms 044719a main Profile
1 month ago CI github-actions:test passed 30 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 60 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 62 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 58 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 65 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 29 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 53 ms 78a4357 main Profile