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

ProjectRunPage::test_other_peoples_project

First seen 2 years, 11 months ago in b9e98d9
CI github-actions:test 15 runs
Average
75 ms
median 55 ms
max 204 ms
Phases
Setup 0.64 ms Call 75 ms Teardown 0.15 ms
Categories
Database 20 ms Test code 0.15 ms Other (Libraries, Unsampled, pytest, Deep copies) 55 ms

31 database queries per run

Needs 306 KB of memory (max 540 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call165 ms99.6%
ProjectRunPage.test_other_peoples_projectapps/projects/tests.py:320 response = self.client.get(other_project.url("project_run", other_project_run.number))160 ms96.1%
Client.getdjango/test/client.py:1124160 ms96.1%
RequestFactory.getdjango/test/client.py:475160 ms96.1%
RequestFactory.genericdjango/test/client.py:671160 ms96.1%
Client.requestdjango/test/client.py:1082160 ms96.1%
ClientHandler.__call__django/test/client.py:173156 ms94.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:62156 ms94.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:104156 ms94.0%
WhiteNoise.add_fileswhitenoise/base.py:108156 ms94.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:120156 ms94.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:131155 ms93.3%
WhiteNoise.get_static_filewhitenoise/base.py:208155 ms93.3%
StaticFile.__init__whitenoise/responders.py:72153 ms91.9%
StaticFile.get_file_statswhitenoise/responders.py:163153 ms91.9%
<GC>~153 ms91.9%
StaticFile.__init__whitenoise/responders.py:732 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1671 ms0.7%
StaticFile.get_headerswhitenoise/responders.py:1761 ms0.7%
ClientHandler.__call__django/test/client.py:1863 ms2.1%
BaseHandler.get_responsedjango/core/handlers/base.py:1413 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1303 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1233 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:343 ms2.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms2.1%
BaseHandler._get_responsedjango/core/handlers/base.py:1983 ms2.1%
project_runapps/projects/urls.py:4013 ms2.1%
find_projectapps/projects/urls.py:522 ms1.4%
can_viewapps/projects/urls.py:332 ms1.4%
can_manage_projectapps/projects/urls.py:38 if not user.is_authenticated:1 ms0.7%
new_method_proxy.<locals>.innerdjango/utils/functional.py:2511 ms0.7%
SimpleLazyObject._setupdjango/utils/functional.py:4041 ms0.7%
AuthenticationMiddleware.process_request.<locals>.<lambda>django/contrib/auth/middleware.py:401 ms0.7%
get_userdjango/contrib/auth/middleware.py:201 ms0.7%
get_userdjango/contrib/auth/__init__.py:3111 ms0.7%
_get_user_session_keydjango/contrib/auth/__init__.py:951 ms0.7%
SessionBase.__getitem__django/contrib/sessions/backends/base.py:551 ms0.7%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2511 ms0.7%
SessionStore.loaddjango/contrib/sessions/backends/db.py:551 ms0.7%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:341 ms0.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.7%
QuerySet.getdjango/db/models/query.py:6351 ms0.7%
QuerySet.__len__django/db/models/query.py:3721 ms0.7%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms0.7%
ModelIterable.__iter__django/db/models/query.py:951 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms0.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.7%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.7%
Cursor.executepsycopg/cursor.py:1131 ms0.7%
Connection.waitpsycopg/connection.py:4951 ms0.7%
can_manage_projectapps/projects/urls.py:40 return user.is_superuser or project.organization.membership_set.filter(user=user).exists()1 ms0.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.7%
create_reverse_many_to_one_manager.<locals>.RelatedManager.get_querysetdjango/db/models/fields/related_descriptors.py:7571 ms0.7%
find_projectapps/projects/urls.py:49 project = get_object_or_404(1 ms0.7%
get_object_or_404django/shortcuts.py:901 ms0.7%
QuerySet.getdjango/db/models/query.py:6351 ms0.7%
QuerySet.__len__django/db/models/query.py:3721 ms0.7%
QuerySet._fetch_alldjango/db/models/query.py:20001 ms0.7%
ModelIterable.__iter__django/db/models/query.py:951 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms0.7%
CursorWrapper.executedjango/db/backends/utils.py:791 ms0.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms0.7%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms0.7%
Cursor.executepsycopg/cursor.py:1131 ms0.7%
Connection.waitpsycopg/connection.py:4951 ms0.7%
ProjectRunPage.setUpapps/projects/tests.py:308 self.client.force_login(self.user)1 ms0.7%
ClientMixin.force_logindjango/test/client.py:8551 ms0.7%
ClientMixin._logindjango/test/client.py:8831 ms0.7%
SessionStore.savedjango/contrib/sessions/backends/db.py:1231 ms0.7%
SessionStore.create_model_instancedjango/contrib/sessions/backends/db.py:1021 ms0.7%
SessionBase.encodedjango/contrib/sessions/backends/base.py:1261 ms0.7%
dumpsdjango/core/signing.py:1511 ms0.7%
Signer.sign_objectdjango/core/signing.py:2391 ms0.7%
TimestampSigner.signdjango/core/signing.py:2601 ms0.7%
ProjectRunPage.test_other_peoples_projectapps/projects/tests.py:3171 ms0.7%
make_projectapps/projects/testing.py:671 ms0.7%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():1 ms0.7%
QuerySet.existsdjango/db/models/query.py:13371 ms0.7%
Query.has_resultsdjango/db/models/sql/query.py:6811 ms0.7%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15921 ms0.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16111 ms0.7%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7951 ms0.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5781 ms0.7%
WhereNode.as_sqldjango/db/models/sql/where.py:1511 ms0.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5781 ms0.7%
RelatedLookupMixin.as_sqldjango/db/models/fields/related_lookups.py:1281 ms0.7%
Exact.as_sqldjango/db/models/lookups.py:4071 ms0.7%
BuiltinLookup.as_sqldjango/db/models/lookups.py:2381 ms0.7%
BuiltinLookup.process_lhsdjango/db/models/lookups.py:2301 ms0.7%
Lookup.process_lhsdjango/db/models/lookups.py:1101 ms0.7%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5781 ms0.7%
ProjectRunPage.test_other_peoples_projectapps/projects/tests.py:318 ingest = Ingest.objects.create(project=other_project, data={})1 ms0.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.7%
QuerySet.createdjango/db/models/query.py:6691 ms0.7%
Model.savedjango/db/models/base.py:8741 ms0.7%
Model.save_basedjango/db/models/base.py:9661 ms0.7%
Model._save_tabledjango/db/models/base.py:11671 ms0.7%
Model._do_insertdjango/db/models/base.py:12181 ms0.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.7%
QuerySet._insertdjango/db/models/query.py:19181 ms0.7%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19241 ms0.7%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18931 ms0.7%
ProjectRunPage.test_other_peoples_projectapps/projects/tests.py:3191 ms0.7%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms0.7%
QuerySet.createdjango/db/models/query.py:6691 ms0.7%
Run.saveapps/projects/models.py:1871 ms0.7%
next_numberapps/projects/models.py:35 return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 11 ms0.7%
QuerySet.aggregatedjango/db/models/query.py:5941 ms0.7%
Query.get_aggregationdjango/db/models/sql/query.py:6331 ms0.7%
Estimated from 142 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:320
response = self.client.get(other_project.url("project_run", other_project_run.number))
ProjectRunPage.test_other_peoples_project · Libraries
156 ms
apps/projects/tests.py:308
self.client.force_login(self.user)
ProjectRunPage.setUp · Libraries
1 ms
apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug · Database
1 ms
apps/projects/tests.py:318
ingest = Ingest.objects.create(project=other_project, data={})
ProjectRunPage.test_other_peoples_project · Database
1 ms
apps/projects/models.py:35
return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 1
next_number · Database
1 ms
apps/projects/urls.py:49
project = get_object_or_404(
find_project · Database
1 ms
apps/projects/urls.py:38
if not user.is_authenticated:
can_manage_project · Database
1 ms
apps/projects/urls.py:40
return user.is_superuser or project.organization.membership_set.filter(user=user).exists()
can_manage_project · Database
1 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.03 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.02 ms
monkeypatch function 0.01 ms

Database

31 queries · 6 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:320
163 ms
call pytest internals 1 ms
call setUp
apps/projects/tests.py:308
1 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 166 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 204 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 176 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 53 ms e141198 main Profile
1 month ago CI github-actions:test passed 26 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 51 ms afde85b main Profile
1 month ago CI github-actions:test passed 45 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 39 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 56 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 55 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 55 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 54 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 55 ms 78a4357 main Profile