Tests / fedidevs/tests.py
TestAnonymousCacheAndCsrf::test_anonymous_post_without_csrf_is_rejected
First seen 14 hours ago in 0c23747
CI
github-actions:test
4 runs
Average
198 ms
median 219 ms
max 269 ms
max 269 ms
Phases
Setup 17 ms
Call 181 ms
Teardown 0.33 ms
Categories
Database 28 ms
Other (Libraries, Templates, Imports, pytest, ...) 170 ms
7 database queries per run
Needs 9 KB of memory (max 20 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 8 hours ago ·
open run
setup11 ms13.0%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()9 ms10.9%
TestCase._enter_atomicsdjango/test/testcases.py:13999 ms10.9%
Atomic.__enter__django/db/transaction.py:2109 ms10.9%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:4549 ms10.9%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:3049 ms10.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms10.9%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:2799 ms10.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms10.9%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms10.9%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms10.9%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3459 ms10.9%
Connection.connectpsycopg/connection.py:1098 ms9.8%
wait_connpsycopg/waiting.py:1458 ms9.8%
BaseConnection._connect_genpsycopg/_connection_base.py:4398 ms9.8%
Connection.connectpsycopg/connection.py:970.93 ms1.1%
Connection._get_connection_paramspsycopg/connection.py:1850.93 ms1.1%
conninfo_to_dictpsycopg/conninfo.py:820.93 ms1.1%
_parse_conninfopsycopg/conninfo.py:1010.93 ms1.1%
<lambda><string>:10.93 ms1.1%
__init____init__:-10.93 ms1.1%
call74 ms86.7%
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejectedfedidevs/tests.py:80 client.get("/login/")65 ms76.6%
Client.getdjango/test/client.py:113365 ms76.6%
RequestFactory.getdjango/test/client.py:47565 ms76.6%
RequestFactory.genericdjango/test/client.py:67165 ms76.6%
Client.requestdjango/test/client.py:109165 ms76.6%
ClientHandler.__call__django/test/client.py:17355 ms64.5%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6355 ms64.5%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10455 ms64.5%
WhiteNoise.add_fileswhitenoise/base.py:10855 ms64.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12045 ms52.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13143 ms50.4%
WhiteNoise.get_static_filewhitenoise/base.py:21731 ms36.3%
StaticFile.__init__whitenoise/responders.py:7721 ms24.2%
StaticFile.get_alternativeswhitenoise/responders.py:20710 ms12.1%
Headers.items<stdlib>/wsgiref/headers.py:13110 ms12.1%
<GC>~10 ms12.1%
StaticFile.get_alternativeswhitenoise/responders.py:2033 ms4.0%
Headers.__setitem__<stdlib>/wsgiref/headers.py:622 ms2.0%
Headers.__delitem__<stdlib>/wsgiref/headers.py:722 ms2.0%
StaticFile.get_alternativeswhitenoise/responders.py:2013 ms4.0%
Headers.__setitem__<stdlib>/wsgiref/headers.py:643 ms4.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:462 ms2.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:522 ms2.0%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms2.0%
__init____init__:-12 ms2.0%
Headers.__init__<stdlib>/wsgiref/headers.py:442 ms2.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.0%
StaticFile.get_alternativeswhitenoise/responders.py:2062 ms2.0%
compile<stdlib>/re/__init__.py:2892 ms2.0%
StaticFile.__init__whitenoise/responders.py:735 ms6.0%
StaticFile.get_headerswhitenoise/responders.py:1773 ms4.0%
Headers.__contains__<stdlib>/wsgiref/headers.py:873 ms4.0%
Headers.get<stdlib>/wsgiref/headers.py:1042 ms2.0%
StaticFile.get_headerswhitenoise/responders.py:1762 ms2.0%
formatdate<stdlib>/email/utils.py:2662 ms2.0%
format_datetime<stdlib>/email/utils.py:2772 ms2.0%
StaticFile.__init__whitenoise/responders.py:763 ms4.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms2.0%
<GC>~2 ms2.0%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms2.0%
Headers.__contains__<stdlib>/wsgiref/headers.py:872 ms2.0%
Headers.get<stdlib>/wsgiref/headers.py:1042 ms2.0%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.0%
StaticFile.__init__whitenoise/responders.py:742 ms2.0%
parsedate<stdlib>/email/_parseaddr.py:1852 ms2.0%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms2.0%
_parsedate_tz<stdlib>/email/_parseaddr.py:1402 ms2.0%
WhiteNoise.get_static_filewhitenoise/base.py:21210 ms12.1%
WhiteNoise.add_cache_headerswhitenoise/base.py:2337 ms8.1%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1767 ms8.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1977 ms8.1%
URLMixin.urldebug_toolbar/panels/staticfiles.py:207 ms8.1%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2357 ms8.1%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2085 ms6.0%
urlsplit<stdlib>/urllib/parse.py:5902 ms2.0%
urlsplit<stdlib>/urllib/parse.py:5822 ms2.0%
_urlsplit<stdlib>/urllib/parse.py:6042 ms2.0%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:2162 ms2.0%
WhiteNoise.add_cache_headerswhitenoise/base.py:2363 ms4.0%
WhiteNoise.get_static_filewhitenoise/base.py:2112 ms2.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1159 ms10.1%
scantreewhitenoise/base.py:2719 ms10.1%
scantreewhitenoise/base.py:2719 ms10.1%
scantreewhitenoise/base.py:2715 ms6.0%
scantreewhitenoise/base.py:2715 ms6.0%
scantreewhitenoise/base.py:2715 ms6.0%
scantreewhitenoise/base.py:2735 ms6.0%
scantreewhitenoise/base.py:2692 ms2.0%
scantreewhitenoise/base.py:2732 ms2.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1162 ms2.0%
ClientHandler.__call__django/test/client.py:18610 ms12.1%
BaseHandler.get_responsedjango/core/handlers/base.py:14210 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12310 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:14510 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
MiddlewareMixin.__call__django/utils/deprecation.py:38010 ms12.1%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5610 ms12.1%
BaseHandler._get_responsedjango/core/handlers/base.py:19910 ms12.1%
loginaccounts/views.py:280 return render(request, "login.html")10 ms12.1%
renderdjango/shortcuts.py:2710 ms12.1%
render_to_stringdjango/template/loader.py:627 ms8.1%
Template.renderdjango/template/backends/django.py:1077 ms8.1%
Template.renderdjango/template/base.py:1757 ms8.1%
instrumented_test_renderdjango/test/utils.py:1137 ms8.1%
NodeList.renderdjango/template/base.py:11087 ms8.1%
Node.render_annotateddjango/template/base.py:10697 ms8.1%
ExtendsNode.renderdjango/template/loader_tags.py:1607 ms8.1%
instrumented_test_renderdjango/test/utils.py:1137 ms8.1%
NodeList.renderdjango/template/base.py:11087 ms8.1%
Node.render_annotateddjango/template/base.py:10697 ms8.1%
BlockNode.renderdjango/template/loader_tags.py:665 ms6.0%
NodeList.renderdjango/template/base.py:11085 ms6.0%
Node.render_annotateddjango/template/base.py:10695 ms6.0%
WithNode.renderdjango/template/defaulttags.py:5815 ms6.0%
NodeList.renderdjango/template/base.py:11085 ms6.0%
Node.render_annotateddjango/template/base.py:10695 ms6.0%
IncludeNode.renderdjango/template/loader_tags.py:2115 ms6.0%
Template.renderdjango/template/base.py:1775 ms6.0%
instrumented_test_renderdjango/test/utils.py:1135 ms6.0%
NodeList.renderdjango/template/base.py:11085 ms6.0%
Node.render_annotateddjango/template/base.py:10695 ms6.0%
SimpleNode.renderdjango/template/library.py:3435 ms6.0%
instances_datalistaccounts/templatetags/account_extras.py:36 for instance in instances:5 ms6.0%
QuerySet.__iter__django/db/models/query.py:4395 ms6.0%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms6.0%
FlatValuesListIterable.__iter__django/db/models/query.py:3025 ms6.0%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15745 ms6.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms6.0%
CursorWrapper.executedjango/db/backends/utils.py:795 ms6.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms6.0%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms6.0%
Cursor.executepsycopg/cursor.py:1135 ms6.0%
Connection.waitpsycopg/connection.py:4955 ms6.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms4.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms4.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms4.0%
URLNode.renderdjango/template/defaulttags.py:5112 ms2.0%
reversedjango/urls/base.py:982 ms2.0%
URLResolver._reverse_with_prefixdjango/urls/resolvers.py:8082 ms2.0%
quote<stdlib>/urllib/parse.py:10722 ms2.0%
quote_from_bytes<stdlib>/urllib/parse.py:11112 ms2.0%
render_to_stringdjango/template/loader.py:613 ms4.0%
get_templatedjango/template/loader.py:153 ms4.0%
DjangoTemplates.get_templatedjango/template/backends/django.py:793 ms4.0%
Engine.get_templatedjango/template/engine.py:1863 ms4.0%
Engine.find_templatedjango/template/engine.py:1593 ms4.0%
Loader.get_templatedjango/template/loaders/cached.py:573 ms4.0%
Loader.get_templatedjango/template/loaders/base.py:232 ms2.0%
Loader.get_contentsdjango/template/loaders/cached.py:262 ms2.0%
Loader.get_contentsdjango_cotton/cotton_loader.py:302 ms2.0%
Loader._get_template_stringdjango_cotton/cotton_loader.py:472 ms2.0%
Loader.get_templatedjango/template/loaders/base.py:282 ms2.0%
__init____init__:-12 ms2.0%
Template.__init__django/template/base.py:1582 ms2.0%
Template.compile_nodelistdjango/template/base.py:2002 ms2.0%
Parser.parsedjango/template/base.py:6012 ms2.0%
do_extendsdjango/template/loader_tags.py:3062 ms2.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()5 ms6.0%
TestCase._fixture_teardowndjango/test/testcases.py:14973 ms4.0%
TestCase._should_check_constraintsdjango/test/testcases.py:15063 ms4.0%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5043 ms4.0%
Cursor.executepsycopg/cursor.py:1133 ms4.0%
Connection.waitpsycopg/connection.py:4953 ms4.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms4.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms4.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms4.0%
TestCase._fixture_teardowndjango/test/testcases.py:15002 ms2.0%
TestCase._rollback_atomicsdjango/test/testcases.py:14082 ms2.0%
Atomic.__exit__django/db/transaction.py:2982 ms2.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.0%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms2.0%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms2.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.0%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.0%
Cursor.executepsycopg/cursor.py:1132 ms2.0%
Connection.waitpsycopg/connection.py:4952 ms2.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.0%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()2 ms2.0%
TestCase._fixture_setupdjango/test/testcases.py:14812 ms2.0%
TestCase._enter_atomicsdjango/test/testcases.py:13992 ms2.0%
Atomic.__enter__django/db/transaction.py:2232 ms2.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.0%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms2.0%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms2.0%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.0%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.0%
Cursor.executepsycopg/cursor.py:1132 ms2.0%
Connection.waitpsycopg/connection.py:4952 ms2.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.0%
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejectedfedidevs/tests.py:81 response = client.post("/i18n/setlang/", {"language": "de", "next": "/login/"})2 ms2.0%
Client.postdjango/test/client.py:11622 ms2.0%
RequestFactory.postdjango/test/client.py:4992 ms2.0%
RequestFactory.genericdjango/test/client.py:6712 ms2.0%
Client.requestdjango/test/client.py:10912 ms2.0%
ClientHandler.__call__django/test/client.py:1862 ms2.0%
BaseHandler.get_responsedjango/core/handlers/base.py:1422 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1452 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
MiddlewareMixin.__call__django/utils/deprecation.py:3802 ms2.0%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:562 ms2.0%
BaseHandler._get_responsedjango/core/handlers/base.py:1872 ms2.0%
CsrfViewMiddleware.process_viewdjango/middleware/csrf.py:4682 ms2.0%
CsrfViewMiddleware._rejectdjango/middleware/csrf.py:2102 ms2.0%
csrf_failuredjango/views/csrf.py:682 ms2.0%
cspdjango/template/context_processors.py:982 ms2.0%
get_noncedjango/middleware/csp.py:62 ms2.0%
SysMonitor.sysmon_py_startcoverage/sysmon.py:345 disp = self.should_trace(filename, frame) # type: ignore[arg-type]2 ms2.0%
Coverage._should_tracecoverage/control.py:4522 ms2.0%
InOrOut.should_tracecoverage/inorout.py:4012 ms2.0%
canonical_filenamecoverage/files.py:852 ms2.0%
abs_filecoverage/files.py:1582 ms2.0%
realpath<frozen posixpath>:4602 ms2.0%
Estimated from 55 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
fedidevs/tests.py:80
client.get("/login/")
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejected
· Libraries
|
55 ms |
|
accounts/templatetags/account_extras.py:36
for instance in instances:
instances_datalist
· Database
|
5 ms |
|
accounts/views.py:280
return render(request, "login.html")
login
· Templates
|
5 ms |
|
fedidevs/tests.py:81
response = client.post("/i18n/setlang/", {"language": "de", "next": "/login/"})
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejected
· Templates
|
2 ms |
Fixtures
Exact setup time| _unittest_setUpClass_fixture_TestAnonymousCacheAndCsrf class | 10 ms |
| _django_setup_unittest class | 0.24 ms |
| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.06 ms |
| _django_db_marker function | 0.04 ms |
| _django_isolate_apps function | 0.04 ms |
| _live_server_helper function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
7 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call test body
fedidevs/tests.py:80
|
67 ms |
|
setup setUpClass
django/test/testcases.py:1426
|
9 ms |
|
call _post_teardown
django/test/testcases.py:1243
|
5 ms |
|
call _pre_setup
django/test/testcases.py:1167
|
2 ms |
| setup pytest internals | 0.93 ms |
Reliability
5 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 5 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 8 hours ago | CI github-actions:test | passed | 85 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 252 ms | Profile |
| 8 hours ago | CI github-actions:test | passed | 186 ms | Profile |
| 13 hours ago | CI github-actions:test | passed | 269 ms | Profile |
| 14 hours ago | CI github-actions:test | passed | 140 ms | Run |