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

ProfileUploadTest::test_reject_too_large_uncompressed

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
43 ms
median 39 ms
max 99 ms
Phases
Setup 0.68 ms Call 42 ms Teardown 0.16 ms
Categories
Database 10 ms App code 0.33 ms Other (Libraries, Serialization, Unsampled, pytest, ...) 32 ms

10 database queries per run

Needs 102 KB of memory (max 392 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
call40 ms97.7%
ProfileUploadTest.test_reject_too_large_uncompressedapps/api/tests.py:618 response = self.upload(self.document())38 ms92.8%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(38 ms92.8%
Client.postdjango/test/client.py:115338 ms92.8%
RequestFactory.postdjango/test/client.py:49938 ms92.8%
RequestFactory.genericdjango/test/client.py:67138 ms92.8%
Client.requestdjango/test/client.py:108238 ms92.8%
ClientHandler.__call__django/test/client.py:17334 ms83.0%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6234 ms83.0%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10434 ms83.0%
WhiteNoise.add_fileswhitenoise/base.py:10834 ms83.0%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12034 ms83.0%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13134 ms83.0%
WhiteNoise.get_static_filewhitenoise/base.py:20828 ms68.4%
StaticFile.__init__whitenoise/responders.py:7710 ms24.4%
StaticFile.get_alternativeswhitenoise/responders.py:2008 ms19.5%
__init____init__:-12 ms4.9%
Headers.__init__<stdlib>/wsgiref/headers.py:442 ms4.9%
Headers._convert_string_type<stdlib>/wsgiref/headers.py:502 ms4.9%
StaticFile.get_alternativeswhitenoise/responders.py:2072 ms4.9%
StaticFile.__init__whitenoise/responders.py:738 ms19.5%
StaticFile.get_headerswhitenoise/responders.py:1764 ms9.8%
formatdate<stdlib>/email/utils.py:2664 ms9.8%
format_datetime<stdlib>/email/utils.py:2842 ms4.9%
StaticFile.get_headerswhitenoise/responders.py:1784 ms9.8%
parsedate<stdlib>/email/_parseaddr.py:1854 ms9.8%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms4.9%
_parsedate_tz<stdlib>/email/_parseaddr.py:1802 ms4.9%
StaticFile.__init__whitenoise/responders.py:724 ms9.8%
StaticFile.get_file_statswhitenoise/responders.py:1612 ms4.9%
__init____init__:-12 ms4.9%
FileEntry.__init__whitenoise/responders.py:2622 ms4.9%
StaticFile.get_file_statswhitenoise/responders.py:1592 ms4.9%
StaticFile.__init__whitenoise/responders.py:764 ms9.8%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1882 ms4.9%
WhiteNoise.get_static_filewhitenoise/base.py:2024 ms9.8%
WhiteNoise.add_mime_headerswhitenoise/base.py:2212 ms4.9%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms4.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms4.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms4.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms4.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms4.9%
ClientHandler.__call__django/test/client.py:1864 ms9.8%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms9.8%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms9.8%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms9.8%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms9.8%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms9.8%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms9.8%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))2 ms4.9%
get_object_or_404django/shortcuts.py:902 ms4.9%
QuerySet.getdjango/db/models/query.py:6352 ms4.9%
QuerySet.__len__django/db/models/query.py:3722 ms4.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.9%
ModelIterable.__iter__django/db/models/query.py:952 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms4.9%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms4.9%
QuerySet.__iter__django/db/models/query.py:3902 ms4.9%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms4.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms4.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms4.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms4.9%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4832 ms4.9%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.9%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.9%
Cursor.executepsycopg/cursor.py:1132 ms4.9%
Connection.waitpsycopg/connection.py:4952 ms4.9%
Estimated from 20 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
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
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token · Database
2 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.05 ms
_dj_autoclear_mailbox function 0.05 ms
_django_db_marker function 0.05 ms
_django_set_urlconf function 0.05 ms
_live_server_helper function 0.04 ms
_django_clear_site_cache function 0.03 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
38 ms
call _post_teardown
django/test/testcases.py:1240
2 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 41 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 31 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 38 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 30 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 56 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 23 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 44 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 44 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 50 ms ec75501 main Profile
3 weeks ago CI github-actions:test passed 99 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 23 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 37 ms 78a4357 main Profile