Tests / fedidevs/tests.py
TestAnonymousCacheAndCsrf::test_anonymous_post_without_csrf_is_rejected
First seen 1 month, 1 week ago in 0c23747
CI
github-actions:test
13 runs
Average
131 ms
median 108 ms
max 269 ms
max 269 ms
Phases
Setup 9 ms
Call 122 ms
Teardown 0.36 ms
Categories
Database 23 ms
Other (Libraries, Templates, pytest, Imports, ...) 108 ms
7 database queries per run
Needs 84 KB of memory (max 972 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
setup3 ms3.7%
call76 ms96.0%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()43 ms54.2%
TestCase._fixture_teardowndjango/test/testcases.py:149823 ms29.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:49523 ms29.2%
CursorWrapper.executedjango/db/backends/utils.py:7923 ms29.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9223 ms29.2%
CursorWrapper._executedjango/db/backends/utils.py:10323 ms29.2%
Cursor.executepsycopg/cursor.py:11323 ms29.2%
Connection.waitpsycopg/connection.py:49523 ms29.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.1%
TestCase._fixture_teardowndjango/test/testcases.py:149718 ms22.9%
TestCase._should_check_constraintsdjango/test/testcases.py:150618 ms22.9%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:50417 ms20.9%
Cursor.executepsycopg/cursor.py:11317 ms20.9%
Connection.waitpsycopg/connection.py:49517 ms20.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms2.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms2.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms2.1%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5032 ms2.1%
TestCase._fixture_teardowndjango/test/testcases.py:15002 ms2.1%
TestCase._rollback_atomicsdjango/test/testcases.py:14082 ms2.1%
Atomic.__exit__django/db/transaction.py:2952 ms2.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms2.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms2.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms2.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms2.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms2.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms2.1%
Cursor.executepsycopg/cursor.py:1132 ms2.1%
Connection.waitpsycopg/connection.py:4952 ms2.1%
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejectedfedidevs/tests.py:87 client.get("/login/")25 ms31.3%
Client.getdjango/test/client.py:113325 ms31.3%
RequestFactory.getdjango/test/client.py:47525 ms31.3%
RequestFactory.genericdjango/test/client.py:67125 ms31.3%
Client.requestdjango/test/client.py:109125 ms31.3%
ClientHandler.__call__django/test/client.py:17320 ms25.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6320 ms25.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10420 ms25.0%
WhiteNoise.add_fileswhitenoise/base.py:10820 ms25.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12012 ms14.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms14.6%
WhiteNoise.get_static_filewhitenoise/base.py:2178 ms10.4%
StaticFile.__init__whitenoise/responders.py:773 ms4.2%
StaticFile.get_alternativeswhitenoise/responders.py:2003 ms4.2%
__init____init__:-13 ms4.2%
Headers.__init__<stdlib>/wsgiref/headers.py:433 ms4.2%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:503 ms4.2%
StaticFile.__init__whitenoise/responders.py:733 ms4.2%
StaticFile.get_headerswhitenoise/responders.py:1702 ms2.1%
Headers.__setitem__<stdlib>/wsgiref/headers.py:602 ms2.1%
StaticFile.get_headerswhitenoise/responders.py:1762 ms2.1%
StaticFile.__init__whitenoise/responders.py:722 ms2.1%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms2.1%
__init____init__:-12 ms2.1%
FileEntry.__init__whitenoise/responders.py:2632 ms2.1%
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.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms2.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms2.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1158 ms10.4%
scantreewhitenoise/base.py:2718 ms10.4%
scantreewhitenoise/base.py:2717 ms8.3%
scantreewhitenoise/base.py:2733 ms4.2%
scantreewhitenoise/base.py:2713 ms4.2%
scantreewhitenoise/base.py:2713 ms4.2%
scantreewhitenoise/base.py:2732 ms2.1%
scantreewhitenoise/base.py:2712 ms2.1%
scantreewhitenoise/base.py:2732 ms2.1%
scantreewhitenoise/base.py:2732 ms2.1%
ClientHandler.__call__django/test/client.py:1865 ms6.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1425 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1455 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1995 ms6.3%
loginaccounts/views.py:280 return render(request, "login.html")5 ms6.3%
renderdjango/shortcuts.py:275 ms6.3%
render_to_stringdjango/template/loader.py:625 ms6.3%
Template.renderdjango/template/backends/django.py:1075 ms6.3%
Template.renderdjango/template/base.py:1755 ms6.3%
instrumented_test_renderdjango/test/utils.py:1135 ms6.3%
NodeList.renderdjango/template/base.py:11085 ms6.3%
Node.render_annotateddjango/template/base.py:10695 ms6.3%
ExtendsNode.renderdjango/template/loader_tags.py:1605 ms6.3%
instrumented_test_renderdjango/test/utils.py:1135 ms6.3%
NodeList.renderdjango/template/base.py:11085 ms6.3%
Node.render_annotateddjango/template/base.py:10695 ms6.3%
IfNode.renderdjango/template/defaulttags.py:3333 ms4.2%
NodeList.renderdjango/template/base.py:11083 ms4.2%
Node.render_annotateddjango/template/base.py:10693 ms4.2%
IncludeNode.renderdjango/template/loader_tags.py:2113 ms4.2%
Template.renderdjango/template/base.py:1773 ms4.2%
instrumented_test_renderdjango/test/utils.py:1133 ms4.2%
NodeList.renderdjango/template/base.py:11083 ms4.2%
Node.render_annotateddjango/template/base.py:10693 ms4.2%
SimpleNode.renderdjango/template/library.py:3433 ms4.2%
instances_datalistaccounts/templatetags/account_extras.py:36 for instance in instances:3 ms4.2%
QuerySet.__iter__django/db/models/query.py:4393 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:22623 ms4.2%
FlatValuesListIterable.__iter__django/db/models/query.py:3023 ms4.2%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15743 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16253 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:793 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms2.1%
Cursor.executepsycopg/cursor.py:1132 ms2.1%
Connection.waitpsycopg/connection.py:4952 ms2.1%
StaticNode.renderdjango/templatetags/static.py:1162 ms2.1%
StaticNode.urldjango/templatetags/static.py:1132 ms2.1%
StaticNode.handle_simpledjango/templatetags/static.py:1292 ms2.1%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms2.1%
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejectedfedidevs/tests.py:88 response = client.post("/i18n/setlang/", {"language": "de", "next": "/login/"})7 ms8.3%
Client.postdjango/test/client.py:11627 ms8.3%
RequestFactory.postdjango/test/client.py:4997 ms8.3%
RequestFactory.genericdjango/test/client.py:6717 ms8.3%
Client.requestdjango/test/client.py:10917 ms8.3%
ClientHandler.__call__django/test/client.py:1867 ms8.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1427 ms8.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms8.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3807 ms8.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:567 ms8.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1235 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1455 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3805 ms6.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:565 ms6.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1875 ms6.3%
CsrfViewMiddleware.process_viewdjango/middleware/csrf.py:4685 ms6.3%
CsrfViewMiddleware._rejectdjango/middleware/csrf.py:2105 ms6.3%
csrf_failuredjango/views/csrf.py:763 ms4.2%
Engine.from_stringdjango/template/engine.py:1703 ms4.2%
Template.__init__django/template/base.py:1583 ms4.2%
Template.compile_nodelistdjango/template/base.py:2003 ms4.2%
Parser.parsedjango/template/base.py:6013 ms4.2%
do_ifdjango/template/defaulttags.py:9943 ms4.2%
Parser.parsedjango/template/base.py:5553 ms4.2%
Parser.compile_filterdjango/template/base.py:6942 ms2.1%
do_ifdjango/template/defaulttags.py:9942 ms2.1%
Parser.parsedjango/template/base.py:5552 ms2.1%
Parser.compile_filterdjango/template/base.py:6942 ms2.1%
csrf_failuredjango/views/csrf.py:772 ms2.1%
Template.renderdjango/template/base.py:1752 ms2.1%
instrumented_test_renderdjango/test/utils.py:1122 ms2.1%
Signal.senddjango/dispatch/dispatcher.py:2492 ms2.1%
MiddlewareMixin.__call__django/utils/deprecation.py:3822 ms2.1%
CSPMiddleware.process_responsecsp/middleware.py:922 ms2.1%
teardown0.26 ms0.3%
Estimated from 49 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
fedidevs/tests.py:87
client.get("/login/")
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejected
· Libraries
|
20 ms |
|
fedidevs/tests.py:88
response = client.post("/i18n/setlang/", {"language": "de", "next": "/login/"})
TestAnonymousCacheAndCsrf.test_anonymous_post_without_csrf_is_rejected
· Templates
|
7 ms |
|
accounts/templatetags/account_extras.py:36
for instance in instances:
instances_datalist
· Database
|
3 ms |
|
accounts/views.py:280
return render(request, "login.html")
login
· Templates
|
2 ms |
Fixtures
Exact setup time| _django_db_marker function | 0.07 ms |
| _template_string_if_invalid_marker function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_set_urlconf function | 0.03 ms |
| monkeypatch function | 0.03 ms |
| _django_isolate_apps function | 0.03 ms |
| _live_server_helper function | 0.03 ms |
| _django_clear_site_cache function | 0.03 ms |
Database
7 queries · 4 msNo repeated queries.
Biggest pieces of work
|
call _post_teardown
django/test/testcases.py:1243
|
43 ms |
|
call test body
fedidevs/tests.py:87
|
32 ms |
| setup pytest internals | 3 ms |
| call pytest internals | 2 ms |
Reliability
14 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 14 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 80 ms | Profile |
| 2 weeks, 5 days ago | CI github-actions:test | passed | 108 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 122 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 81 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 102 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 87 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 65 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 141 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 124 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 85 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 252 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 186 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 269 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 140 ms | Run |