flakytest.dev anze3db fedidevs
Tests / starter_packs/tests.py

TestOwnerManagement::test_non_owner_cannot_cancel_invitation

First seen 1 month, 1 week ago in 0c23747
CI github-actions:test 13 runs
Average
143 ms
median 141 ms
max 280 ms
Phases
Setup 9 ms Call 134 ms Teardown 0.33 ms
Categories
Database 44 ms Factories 0.70 ms Other (Libraries, pytest, Unsampled, Deep copies, ...) 99 ms

27 database queries per run

Needs 122 KB of memory (max 524 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call66 ms98.6%
TestOwnerManagement.test_non_owner_cannot_cancel_invitationstarter_packs/tests.py:558 response = self.client.post(reverse("cancel_invitation", args=[self.pack.slug, self.friend.id]))30 ms44.5%
Client.postdjango/test/client.py:116230 ms44.5%
RequestFactory.postdjango/test/client.py:49930 ms44.5%
RequestFactory.genericdjango/test/client.py:67129 ms43.1%
Client.requestdjango/test/client.py:109128 ms41.7%
ClientHandler.__call__django/test/client.py:17317 ms25.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6317 ms25.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10416 ms23.6%
WhiteNoise.add_fileswhitenoise/base.py:10811 ms16.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1207 ms9.7%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1317 ms9.7%
WhiteNoise.get_static_filewhitenoise/base.py:2174 ms5.6%
StaticFile.__init__whitenoise/responders.py:733 ms4.2%
StaticFile.get_headerswhitenoise/responders.py:1810.93 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1760.93 ms1.4%
StaticFile.get_headerswhitenoise/responders.py:1670.93 ms1.4%
StaticFile.__init__whitenoise/responders.py:770.93 ms1.4%
StaticFile.get_alternativeswhitenoise/responders.py:2000.93 ms1.4%
__init____init__:-10.93 ms1.4%
Headers.__init__<stdlib>/wsgiref/headers.py:430.93 ms1.4%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:500.93 ms1.4%
WhiteNoise.get_static_filewhitenoise/base.py:2123 ms4.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:2333 ms4.2%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms2.8%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms2.8%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms2.8%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2350.93 ms1.4%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2160.93 ms1.4%
FileSystemStorage.urldjango/core/files/storage/filesystem.py:2070.93 ms1.4%
urljoin<stdlib>/urllib/parse.py:7070.93 ms1.4%
_urlsplit<stdlib>/urllib/parse.py:6050.93 ms1.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms6.9%
scantreewhitenoise/base.py:2714 ms5.6%
scantreewhitenoise/base.py:2714 ms5.6%
scantreewhitenoise/base.py:2712 ms2.8%
scantreewhitenoise/base.py:2712 ms2.8%
scantreewhitenoise/base.py:2712 ms2.8%
scantreewhitenoise/base.py:2690.93 ms1.4%
scantreewhitenoise/base.py:2730.93 ms1.4%
scantreewhitenoise/base.py:2690.93 ms1.4%
scantreewhitenoise/base.py:2730.93 ms1.4%
scantreewhitenoise/base.py:2730.93 ms1.4%
WhiteNoise.add_fileswhitenoise/base.py:1075 ms6.9%
isdir<frozen genericpath>:525 ms6.9%
MiddlewareMixin.__init__django/utils/deprecation.py:3560.93 ms1.4%
ClientHandler.__call__django/test/client.py:18611 ms16.7%
BaseHandler.get_responsedjango/core/handlers/base.py:14210 ms15.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms15.3%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms15.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms15.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1239 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1459 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:569 ms13.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3809 ms13.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:568 ms12.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1998 ms12.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:638 ms12.5%
user_passes_test.<locals>.decorator.<locals>._view_wrapperdjango/contrib/auth/decorators.py:628 ms12.5%
cancel_invitationstarter_packs/views.py:4968 ms12.5%
get_editable_packstarter_packs/views.py:60 return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)8 ms12.5%
get_object_or_404django/shortcuts.py:1007 ms11.1%
QuerySet.getdjango/db/models/query.py:7027 ms11.1%
QuerySet.__len__django/db/models/query.py:4217 ms11.1%
QuerySet._fetch_alldjango/db/models/query.py:22627 ms11.1%
ModelIterable.__iter__django/db/models/query.py:1037 ms11.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16257 ms11.1%
CursorWrapper.executedjango/db/backends/utils.py:797 ms11.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:927 ms11.1%
CursorWrapper._executedjango/db/backends/utils.py:1057 ms11.1%
Cursor.executepsycopg/cursor.py:1137 ms11.1%
Connection.waitpsycopg/connection.py:4957 ms11.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2067 ms11.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2867 ms11.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:787 ms11.1%
get_object_or_404django/shortcuts.py:1050.93 ms1.4%
gettextdjango/utils/translation/__init__.py:960.93 ms1.4%
gettextdjango/utils/translation/trans_real.py:3850.93 ms1.4%
GNUTranslations.gettext<stdlib>/gettext.py:4440.93 ms1.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:580.93 ms1.4%
response_for_exceptiondjango/core/handlers/exception.py:690.93 ms1.4%
get_exception_responsedjango/core/handlers/exception.py:1660.93 ms1.4%
make_middleware_decorator.<locals>._make_decorator.<locals>._decorator.<locals>._view_wrapperdjango/utils/decorators.py:1890.93 ms1.4%
page_not_founddjango/views/defaults.py:780.93 ms1.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3820.93 ms1.4%
CSPMiddleware.process_responsecsp/middleware.py:830.93 ms1.4%
build_policycsp/utils.py:990.93 ms1.4%
BaseHandler.get_responsedjango/core/handlers/base.py:1450.93 ms1.4%
Client.requestdjango/test/client.py:10890.93 ms1.4%
TestOwnerManagement.test_non_owner_cannot_cancel_invitationstarter_packs/tests.py:557 self.client.force_login(self.friend) # not an owner24 ms36.1%
ClientMixin.force_logindjango/test/client.py:85824 ms36.1%
ClientMixin._logindjango/test/client.py:88921 ms30.6%
logindjango/contrib/auth/__init__.py:18920 ms29.2%
SessionBase.cycle_keydjango/contrib/sessions/backends/base.py:44020 ms29.2%
SessionStore.deletedjango/contrib/sessions/backends/db.py:17520 ms29.2%
Model.deletedjango/db/models/base.py:133114 ms20.8%
Collector.deletedjango/db/models/deletion.py:48314 ms20.8%
DeleteQuery.delete_batchdjango/db/models/sql/subqueries.py:4314 ms20.8%
DeleteQuery.do_querydjango/db/models/sql/subqueries.py:2514 ms20.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162513 ms19.4%
CursorWrapper.executedjango/db/backends/utils.py:7913 ms19.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9213 ms19.4%
CursorWrapper._executedjango/db/backends/utils.py:10513 ms19.4%
Cursor.executepsycopg/cursor.py:11313 ms19.4%
Connection.waitpsycopg/connection.py:49513 ms19.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:20612 ms18.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28612 ms18.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7812 ms18.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16120.93 ms1.4%
SQLDeleteCompiler.as_sqldjango/db/models/sql/compiler.py:20170.93 ms1.4%
SQLDeleteCompiler._as_sqldjango/db/models/sql/compiler.py:20030.93 ms1.4%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.93 ms1.4%
WhereNode.as_sqldjango/db/models/sql/where.py:1510.93 ms1.4%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5790.93 ms1.4%
In.as_sqldjango/db/models/lookups.py:5560.93 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms6.9%
QuerySet.getdjango/db/models/query.py:7025 ms6.9%
QuerySet.__len__django/db/models/query.py:4215 ms6.9%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms6.9%
ModelIterable.__iter__django/db/models/query.py:1035 ms6.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms6.9%
CursorWrapper.executedjango/db/backends/utils.py:795 ms6.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms6.9%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms6.9%
Cursor.executepsycopg/cursor.py:1135 ms6.9%
Connection.waitpsycopg/connection.py:4955 ms6.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2064 ms5.6%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2864 ms5.6%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:784 ms5.6%
Model.deletedjango/db/models/base.py:13290.93 ms1.4%
logindjango/contrib/auth/__init__.py:1750.93 ms1.4%
AbstractBaseUser.get_session_auth_hashdjango/contrib/auth/base_user.py:1360.93 ms1.4%
AbstractBaseUser._get_session_auth_hashdjango/contrib/auth/base_user.py:1440.93 ms1.4%
salted_hmacdjango/utils/crypto.py:610.93 ms1.4%
ClientMixin._logindjango/test/client.py:8844 ms5.6%
ClientMixin.sessiondjango/test/client.py:8154 ms5.6%
SessionStore.savedjango/contrib/sessions/backends/db.py:1214 ms5.6%
SessionStore.createdjango/contrib/sessions/backends/db.py:744 ms5.6%
SessionStore.savedjango/contrib/sessions/backends/db.py:1273 ms4.2%
Model.savedjango/db/models/base.py:9043 ms4.2%
Model.save_basedjango/db/models/base.py:9963 ms4.2%
Model._save_tabledjango/db/models/base.py:11992 ms2.8%
Model._do_insertdjango/db/models/base.py:12512 ms2.8%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.8%
QuerySet._insertdjango/db/models/query.py:21412 ms2.8%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms2.8%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.8%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.8%
Cursor.executepsycopg/cursor.py:1132 ms2.8%
Connection.waitpsycopg/connection.py:4952 ms2.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.8%
Model._save_tabledjango/db/models/base.py:11000.93 ms1.4%
SessionStore.savedjango/contrib/sessions/backends/db.py:1260.93 ms1.4%
Atomic.__exit__django/db/transaction.py:2590.93 ms1.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:260.93 ms1.4%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4310.93 ms1.4%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3750.93 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.93 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.93 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1030.93 ms1.4%
Cursor.executepsycopg/cursor.py:1130.93 ms1.4%
Connection.waitpsycopg/connection.py:4950.93 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.93 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.93 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.93 ms1.4%
TestOwnerManagement.test_non_owner_cannot_cancel_invitationstarter_packs/tests.py:560 self.assertTrue(self.pack.invitations.filter(invited_user=self.friend).exists())11 ms16.7%
QuerySet.existsdjango/db/models/query.py:14589 ms13.9%
Query.has_resultsdjango/db/models/sql/query.py:6879 ms13.9%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15939 ms13.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16257 ms11.1%
CursorWrapper.executedjango/db/backends/utils.py:797 ms11.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:927 ms11.1%
CursorWrapper._executedjango/db/backends/utils.py:1057 ms11.1%
Cursor.executepsycopg/cursor.py:1137 ms11.1%
Connection.waitpsycopg/connection.py:4957 ms11.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2067 ms11.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2867 ms11.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:787 ms11.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16122 ms2.8%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7960.93 ms1.4%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5750.93 ms1.4%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:9820.93 ms1.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms2.8%
create_reverse_many_to_one_manager.<locals>.RelatedManager.get_querysetdjango/db/models/fields/related_descriptors.py:8100.93 ms1.4%
create_reverse_many_to_one_manager.<locals>.RelatedManager._apply_rel_filtersdjango/db/models/fields/related_descriptors.py:7500.93 ms1.4%
QuerySet.filterdjango/db/models/query.py:16750.93 ms1.4%
QuerySet._not_support_combined_queriesdjango/db/models/query.py:23360.93 ms1.4%
QuerySet.querydjango/db/models/query.py:3550.93 ms1.4%
QuerySet._filter_or_exclude_inplacedjango/db/models/query.py:17040.93 ms1.4%
Query.add_qdjango/db/models/sql/query.py:16810.93 ms1.4%
Query._add_qdjango/db/models/sql/query.py:17130.93 ms1.4%
Query.build_filterdjango/db/models/sql/query.py:15990.93 ms1.4%
Query.trim_joinsdjango/db/models/sql/query.py:20230.93 ms1.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()0.93 ms1.4%
TestCase._fixture_teardowndjango/test/testcases.py:14980.93 ms1.4%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4950.93 ms1.4%
CursorWrapper.executedjango/db/backends/utils.py:790.93 ms1.4%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:920.93 ms1.4%
CursorWrapper._executedjango/db/backends/utils.py:1030.93 ms1.4%
Cursor.executepsycopg/cursor.py:1130.93 ms1.4%
Connection.waitpsycopg/connection.py:4950.93 ms1.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2060.93 ms1.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2860.93 ms1.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:780.93 ms1.4%
Estimated from 71 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

starter_packs/tests.py:557
self.client.force_login(self.friend) # not an owner
TestOwnerManagement.test_non_owner_cannot_cancel_invitation · Database
24 ms
starter_packs/tests.py:558
response = self.client.post(reverse("cancel_invitation", args=[self.pack.slug, self.friend.id]))
TestOwnerManagement.test_non_owner_cannot_cancel_invitation · Libraries
21 ms
starter_packs/tests.py:560
self.assertTrue(self.pack.invitations.filter(invited_user=self.friend).exists())
TestOwnerManagement.test_non_owner_cannot_cancel_invitation · Database
11 ms
starter_packs/views.py:60
return get_object_or_404(StarterPack, slug=slug, owners=request.user, **extra)
get_editable_pack · Database
8 ms

Fixtures

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

25 queries · 8 ms
No repeated queries.

Biggest pieces of work

call test body
starter_packs/tests.py:557
65 ms
call _post_teardown
django/test/testcases.py:1243
0.93 ms

Reliability

14 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 14 results, oldest first in the strip
When Environment Outcome Duration Commit
2 weeks ago CI github-actions:test passed 67 ms 28600ed main Profile
2 weeks, 5 days ago CI github-actions:test passed 170 ms 600b717 main Profile
2 weeks, 6 days ago CI github-actions:test passed 141 ms c28a326 main Profile
3 weeks ago CI github-actions:test passed 60 ms 9b8826a main Profile
3 weeks ago CI github-actions:test passed 174 ms 4f01055 main Profile
1 month ago CI github-actions:test passed 141 ms 8ab642e main Profile
1 month ago CI github-actions:test passed 85 ms 9b75244 main Profile
1 month ago CI github-actions:test passed 172 ms 9603516 main Profile
1 month, 1 week ago CI github-actions:test passed 82 ms 615a272 main Profile
1 month, 1 week ago CI github-actions:test passed 80 ms d923a46 main Profile
1 month, 1 week ago CI github-actions:test passed 280 ms 82997f8 main Profile
1 month, 1 week ago CI github-actions:test passed 182 ms 623aa3e main Profile
1 month, 1 week ago CI github-actions:test passed 226 ms ab6465a main Profile
1 month, 1 week ago CI github-actions:test passed 86 ms 0c23747 main Run