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

TestProjectsHome::test_user_logged_in_without_projects

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
48 ms
median 52 ms
max 66 ms
Phases
Setup 0.65 ms Call 46 ms Teardown 1 ms
Categories
Database 25 ms Other (Libraries, Unsampled, pytest) 23 ms

30 database queries per run

Needs 290 KB of memory (max 788 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.3%
TestProjectsHome.test_user_logged_in_without_projectsft/tests.py:37 response = self.client.get(reverse("projects"))30 ms77.8%
Client.getdjango/test/client.py:112430 ms77.8%
RequestFactory.getdjango/test/client.py:47530 ms77.8%
RequestFactory.genericdjango/test/client.py:67130 ms77.8%
Client.requestdjango/test/client.py:108230 ms77.8%
ClientHandler.__call__django/test/client.py:18619 ms48.6%
BaseHandler.get_responsedjango/core/handlers/base.py:14119 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13019 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12319 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
MiddlewareMixin.__call__django/utils/deprecation.py:30919 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3419 ms48.6%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5519 ms48.6%
BaseHandler._get_responsedjango/core/handlers/base.py:19819 ms48.6%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:5919 ms48.6%
homeapps/orgs/views.py:7217 ms43.8%
current_organizationapps/orgs/views.py:5417 ms43.8%
ensure_organizationapps/orgs/models.py:13115 ms38.9%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():15 ms38.9%
QuerySet.existsdjango/db/models/query.py:133713 ms34.0%
Query.has_resultsdjango/db/models/sql/query.py:68113 ms34.0%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:159213 ms34.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162411 ms29.2%
CursorWrapper.executedjango/db/backends/utils.py:7911 ms29.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9211 ms29.2%
CursorWrapper._executedjango/db/backends/utils.py:10511 ms29.2%
Cursor.executepsycopg/cursor.py:11311 ms29.2%
Connection.waitpsycopg/connection.py:49511 ms29.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:20611 ms29.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28611 ms29.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7811 ms29.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:9382 ms4.9%
QuerySet.filterdjango/db/models/query.py:15422 ms4.9%
QuerySet._filter_or_excludedjango/db/models/query.py:15602 ms4.9%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:15702 ms4.9%
Query.add_qdjango/db/models/sql/query.py:16712 ms4.9%
Query._add_qdjango/db/models/sql/query.py:17182 ms4.9%
JoinPromoter.update_join_typesdjango/db/models/sql/query.py:28422 ms4.9%
ensure_organizationapps/orgs/models.py:133 Membership.objects.create(organization=organization, user=user, role=Membership.Role.OWNER)2 ms4.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.9%
QuerySet.createdjango/db/models/query.py:6692 ms4.9%
homeapps/orgs/views.py:74 if not projects.exists():2 ms4.9%
QuerySet.existsdjango/db/models/query.py:13372 ms4.9%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.9%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
ClientHandler.__call__django/test/client.py:17311 ms29.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6211 ms29.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10411 ms29.2%
WhiteNoise.add_fileswhitenoise/base.py:10811 ms29.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1209 ms24.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1319 ms24.3%
WhiteNoise.get_static_filewhitenoise/base.py:2088 ms19.5%
StaticFile.__init__whitenoise/responders.py:774 ms9.7%
StaticFile.get_alternativeswhitenoise/responders.py:2082 ms4.9%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms4.9%
StaticFile.__init__whitenoise/responders.py:722 ms4.9%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms4.9%
__init____init__:-12 ms4.9%
FileEntry.__init__whitenoise/responders.py:2602 ms4.9%
<GC>~2 ms4.9%
StaticFile.__init__whitenoise/responders.py:732 ms4.9%
StaticFile.get_headerswhitenoise/responders.py:1762 ms4.9%
formatdate<stdlib>/email/utils.py:2662 ms4.9%
format_datetime<stdlib>/email/utils.py:2842 ms4.9%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms4.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms4.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms4.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms4.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms4.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms4.9%
scantreewhitenoise/base.py:2622 ms4.9%
scantreewhitenoise/base.py:2622 ms4.9%
scantreewhitenoise/base.py:2622 ms4.9%
scantreewhitenoise/base.py:2622 ms4.9%
scantreewhitenoise/base.py:2622 ms4.9%
scantreewhitenoise/base.py:2602 ms4.9%
TestProjectsHome.test_user_logged_in_without_projectsft/tests.py:36 self.client.force_login(user)4 ms9.7%
ClientMixin.force_logindjango/test/client.py:8554 ms9.7%
ClientMixin._logindjango/test/client.py:8762 ms4.9%
ClientMixin.sessiondjango/test/client.py:8122 ms4.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1212 ms4.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:742 ms4.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1262 ms4.9%
Atomic.__exit__django/db/transaction.py:2472 ms4.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.9%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.9%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
ClientMixin._logindjango/test/client.py:8812 ms4.9%
logindjango/contrib/auth/__init__.py:1972 ms4.9%
Signal.senddjango/dispatch/dispatcher.py:2092 ms4.9%
update_last_logindjango/contrib/auth/models.py:242 ms4.9%
AbstractBaseUser.savedjango/contrib/auth/base_user.py:622 ms4.9%
Model.savedjango/db/models/base.py:8742 ms4.9%
Model.save_basedjango/db/models/base.py:9662 ms4.9%
Model._save_tabledjango/db/models/base.py:11102 ms4.9%
Model._do_updatedjango/db/models/base.py:12112 ms4.9%
QuerySet._updatedjango/db/models/query.py:13272 ms4.9%
SQLUpdateCompiler.execute_returning_sqldjango/db/models/sql/compiler.py:21402 ms4.9%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.9%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.9%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.9%
TestProjectsHome.test_user_logged_in_without_projectsft/tests.py:39 organization = Organization.objects.get(membership__user=user)2 ms4.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.9%
QuerySet.getdjango/db/models/query.py:6352 ms4.9%
QuerySet.__len__django/db/models/query.py:3722 ms4.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.9%
ModelIterable.__iter__django/db/models/query.py:952 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms4.9%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
teardown0.55 ms1.4%
TestCase.tearDownClassdjango/test/testcases.py:1453 cls._rollback_atomics(cls.cls_atomics)0.55 ms1.4%
TestCase._rollback_atomicsdjango/test/testcases.py:14050.55 ms1.4%
Estimated from 21 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug · Database
15 ms
ft/tests.py:37
response = self.client.get(reverse("projects"))
TestProjectsHome.test_user_logged_in_without_projects · Libraries
11 ms
ft/tests.py:36
self.client.force_login(user)
TestProjectsHome.test_user_logged_in_without_projects · Database
4 ms
apps/orgs/models.py:133
Membership.objects.create(organization=organization, user=user, role=Membership.Role.OWNER)
ensure_organization · Database
2 ms
apps/orgs/views.py:74
if not projects.exists():
home · Database
2 ms
ft/tests.py:39
organization = Organization.objects.get(membership__user=user)
TestProjectsHome.test_user_logged_in_without_projects · 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.02 ms
_django_clear_site_cache function 0.02 ms
_live_server_helper function 0.02 ms
monkeypatch function 0.01 ms

Database

30 queries · 7 ms
No repeated queries.

Biggest pieces of work

call test body
ft/tests.py:37
36 ms
call _post_teardown
django/test/testcases.py:1240
2 ms
teardown tearDownClass
django/test/testcases.py:1453
0.55 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 57 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 31 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 52 ms e141198 main Profile
1 month ago CI github-actions:test passed 29 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 61 ms afde85b main Profile
1 month ago CI github-actions:test passed 47 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 66 ms 044719a main Profile
1 month ago CI github-actions:test passed 34 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 55 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 54 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 54 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 62 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 26 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 50 ms 78a4357 main Profile