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

ProfileUploadTest::test_reject_too_large_uncompressed

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
40 ms
median 37 ms
max 99 ms
Phases
Setup 0.66 ms Call 39 ms Teardown 0.16 ms
Categories
Database 9 ms Test code 0.33 ms App code 0.27 ms Other (Libraries, Unsampled, pytest, Serialization, ...) 30 ms

10 database queries per run

Needs 84 KB of memory (max 392 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call24 ms97.4%
ProfileUploadTest.test_reject_too_large_uncompressedapps/api/tests.py:618 response = self.upload(self.document())22 ms89.3%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(22 ms89.3%
Client.postdjango/test/client.py:115322 ms89.3%
RequestFactory.postdjango/test/client.py:49922 ms89.3%
RequestFactory.genericdjango/test/client.py:67122 ms89.3%
Client.requestdjango/test/client.py:108222 ms89.3%
ClientHandler.__call__django/test/client.py:17316 ms65.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6216 ms65.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10416 ms65.0%
WhiteNoise.add_fileswhitenoise/base.py:10816 ms65.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12014 ms56.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13112 ms48.7%
WhiteNoise.get_static_filewhitenoise/base.py:20812 ms48.7%
StaticFile.__init__whitenoise/responders.py:734 ms16.2%
StaticFile.get_headerswhitenoise/responders.py:1674 ms16.2%
StaticFile.__init__whitenoise/responders.py:772 ms8.1%
StaticFile.get_alternativeswhitenoise/responders.py:2002 ms8.1%
StaticFile.__init__whitenoise/responders.py:722 ms8.1%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms8.1%
__init____init__:-12 ms8.1%
FileEntry.__init__whitenoise/responders.py:2632 ms8.1%
FileEntry.stat_regular_filewhitenoise/responders.py:2762 ms8.1%
<GC>~2 ms8.1%
StaticFile.__init__whitenoise/responders.py:742 ms8.1%
parsedate<stdlib>/email/_parseaddr.py:1852 ms8.1%
StaticFile.__init__whitenoise/responders.py:762 ms8.1%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1892 ms8.1%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms8.1%
Headers.get<stdlib>/wsgiref/headers.py:1042 ms8.1%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms8.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms8.1%
scantreewhitenoise/base.py:2622 ms8.1%
scantreewhitenoise/base.py:2622 ms8.1%
scantreewhitenoise/base.py:2622 ms8.1%
scantreewhitenoise/base.py:2622 ms8.1%
scantreewhitenoise/base.py:2622 ms8.1%
scantreewhitenoise/base.py:2642 ms8.1%
ClientHandler.__call__django/test/client.py:1866 ms24.4%
BaseHandler.get_responsedjango/core/handlers/base.py:1416 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1306 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:346 ms24.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1986 ms24.4%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:656 ms24.4%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:376 ms24.4%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:646 ms24.4%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))4 ms16.2%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms8.1%
QuerySet.__iter__django/db/models/query.py:3902 ms8.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms8.1%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms8.1%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms8.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16222 ms8.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms8.1%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3202 ms8.1%
BaseDatabaseWrapper._cursordjango/db/backends/base/base.py:2982 ms8.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms8.1%
DatabaseWrapper.create_cursordjango/db/backends/postgresql/base.py:4302 ms8.1%
Connection.cursorpsycopg/connection.py:2592 ms8.1%
Atomic.__exit__django/db/transaction.py:2472 ms8.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms8.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms8.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms8.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms8.1%
Cursor.executepsycopg/cursor.py:1132 ms8.1%
Connection.waitpsycopg/connection.py:4952 ms8.1%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))2 ms8.1%
get_object_or_404django/shortcuts.py:902 ms8.1%
QuerySet.getdjango/db/models/query.py:6352 ms8.1%
QuerySet.__len__django/db/models/query.py:3722 ms8.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms8.1%
ModelIterable.__iter__django/db/models/query.py:952 ms8.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms8.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.1%
Cursor.executepsycopg/cursor.py:1132 ms8.1%
Connection.waitpsycopg/connection.py:4952 ms8.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms8.1%
TestCase._fixture_teardowndjango/test/testcases.py:14972 ms8.1%
TestCase._rollback_atomicsdjango/test/testcases.py:14052 ms8.1%
Atomic.__exit__django/db/transaction.py:2832 ms8.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms8.1%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4132 ms8.1%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3712 ms8.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms8.1%
Cursor.executepsycopg/cursor.py:1132 ms8.1%
Connection.waitpsycopg/connection.py:4952 ms8.1%
Estimated from 12 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/api/tests.py:487
response = self.client.post(
ProfileUploadTest.upload · Libraries
16 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
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token · Database
2 ms
apps/api/urls.py:73
touch_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.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.02 ms

Database

10 queries · 2 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:618
22 ms
call _post_teardown
django/test/testcases.py:1240
2 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 25 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 36 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 22 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 41 ms e141198 main Profile
1 month ago CI github-actions:test passed 31 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 38 ms afde85b main Profile
1 month ago CI github-actions:test passed 30 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 56 ms 044719a main Profile
1 month ago CI github-actions:test passed 23 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 44 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 44 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 50 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 99 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 23 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 37 ms 78a4357 main Profile