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

ProfileUploadTest::test_reject_too_large_uncompressed

First seen 9 hours ago in 78a4357
CI github-actions:test 5 runs
Average
51 ms
median 44 ms
max 99 ms
Phases
Setup 0.72 ms Call 50 ms Teardown 0.17 ms
Categories
Database 7 ms App code 0.24 ms Other (Libraries, Unsampled, pytest) 43 ms

10 database queries per run

Needs 165 KB of memory (max 392 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 hours ago · open run
Hide pytest frames
call43 ms98.1%
CallInfo.from_call_pytest/runner.py:35343 ms98.1%
call_and_report.<locals>.<lambda>_pytest/runner.py:24543 ms98.1%
HookCaller.__call__pluggy/_hooks.py:51243 ms98.1%
PluginManager._hookexecpluggy/_manager.py:12043 ms98.1%
_multicallpluggy/_callers.py:12143 ms98.1%
pytest_runtest_call_pytest/runner.py:17943 ms98.1%
_django_setup_unittest.<locals>.non_debugging_runtestpytest_django/plugin.py:57343 ms98.1%
SimpleTestCase.__call__django/test/testcases.py:31343 ms98.1%
SimpleTestCase._setup_and_calldjango/test/testcases.py:36836 ms81.8%
TestCase.__call__<stdlib>/unittest/case.py:74736 ms81.8%
TestCase.run<stdlib>/unittest/case.py:69136 ms81.8%
TestCase._callTestMethod<stdlib>/unittest/case.py:63736 ms81.8%
ProfileUploadTest.test_reject_too_large_uncompressedapps/api/tests.py:618 response = self.upload(self.document())36 ms81.8%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(36 ms81.8%
Client.postdjango/test/client.py:115336 ms81.8%
RequestFactory.postdjango/test/client.py:49936 ms81.8%
RequestFactory.genericdjango/test/client.py:67136 ms81.8%
Client.requestdjango/test/client.py:108236 ms81.8%
ClientHandler.__call__django/test/client.py:17334 ms76.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6234 ms76.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10434 ms76.3%
WhiteNoise.add_fileswhitenoise/base.py:10834 ms76.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12029 ms65.4%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13129 ms65.4%
WhiteNoise.get_static_filewhitenoise/base.py:20822 ms49.1%
StaticFile.__init__whitenoise/responders.py:7712 ms27.3%
StaticFile.get_alternativeswhitenoise/responders.py:20112 ms27.3%
Headers.__setitem__<stdlib>/wsgiref/headers.py:6212 ms27.3%
Headers.__delitem__<stdlib>/wsgiref/headers.py:7212 ms27.3%
<GC>~12 ms27.3%
StaticFile.__init__whitenoise/responders.py:745 ms10.9%
parsedate<stdlib>/email/_parseaddr.py:1832 ms5.5%
parsedate<stdlib>/email/_parseaddr.py:1852 ms5.5%
StaticFile.__init__whitenoise/responders.py:762 ms5.5%
StaticFile.__init__whitenoise/responders.py:732 ms5.5%
StaticFile.get_headerswhitenoise/responders.py:1712 ms5.5%
WhiteNoise.get_static_filewhitenoise/base.py:2037 ms16.4%
WhiteNoise.add_cache_headerswhitenoise/base.py:2245 ms10.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms10.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms10.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms5.5%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1155 ms10.9%
scantreewhitenoise/base.py:2642 ms5.5%
scantreewhitenoise/base.py:2622 ms5.5%
scantreewhitenoise/base.py:2622 ms5.5%
scantreewhitenoise/base.py:2622 ms5.5%
scantreewhitenoise/base.py:2622 ms5.5%
scantreewhitenoise/base.py:2622 ms5.5%
scantreewhitenoise/base.py:2642 ms5.5%
ClientHandler.__call__django/test/client.py:1862 ms5.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1412 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1302 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1232 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3092 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:342 ms5.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms5.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:652 ms5.5%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:372 ms5.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:642 ms5.5%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))2 ms5.5%
get_object_or_404django/shortcuts.py:902 ms5.5%
QuerySet.getdjango/db/models/query.py:6352 ms5.5%
QuerySet.__len__django/db/models/query.py:3722 ms5.5%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms5.5%
ModelIterable.__iter__django/db/models/query.py:952 ms5.5%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms5.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.5%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms5.5%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms5.5%
Cursor.executepsycopg/cursor.py:1132 ms5.5%
Connection.waitpsycopg/connection.py:4952 ms5.5%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3512 ms5.5%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3592 ms5.5%
TransactionTestCase._pre_setupdjango/test/testcases.py:1164 cls._fixture_setup()2 ms5.5%
TestCase._fixture_setupdjango/test/testcases.py:14782 ms5.5%
TestCase._enter_atomicsdjango/test/testcases.py:13962 ms5.5%
Atomic.__enter__django/db/transaction.py:2112 ms5.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.5%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms5.5%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms5.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.5%
QueryTracker._django_wrapperflakytest/profiling/dbtrack.py:1002 ms5.5%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms5.5%
Cursor.executepsycopg/cursor.py:1132 ms5.5%
Connection.waitpsycopg/connection.py:4952 ms5.5%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms5.5%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms5.5%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms5.5%
SimpleTestCase._setup_and_calldjango/test/testcases.py:3712 ms5.5%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms5.5%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms5.5%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms5.5%
Atomic.__exit__django/db/transaction.py:2832 ms5.5%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms5.5%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms5.5%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms5.5%
CursorWrapper.executedjango/db/backends/utils.py:792 ms5.5%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms5.5%
Estimated from 18 samples; phase durations are exact. Frames from pytest and pluggy are shown .

Hot lines in your code

apps/api/tests.py:487
response = self.client.post(
ProfileUploadTest.upload · Libraries
34 ms
apps/api/urls.py:72
project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view · Database
2 ms

Fixtures

Exact setup time
_dj_autoclear_mailbox function 0.04 ms
_template_string_if_invalid_marker function 0.04 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.03 ms
monkeypatch function 0.02 ms

Database

10 queries · 3 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:618
36 ms
call pytest internals 2 ms
call _pre_setup
django/test/testcases.py:1164
2 ms
call _post_teardown
django/test/testcases.py:1240
2 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
2 hours ago CI github-actions:test passed 44 ms 9caa567 main Profile
2 hours ago CI github-actions:test passed 50 ms ec75501 main Profile
9 hours ago CI github-actions:test passed 99 ms d2c12e5 main Profile
9 hours ago CI github-actions:test passed 23 ms 0b902f6 main Profile
9 hours ago CI github-actions:test passed 37 ms 78a4357 main Profile