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

ProfileUploadTest::test_reject_too_large

First seen 8 hours ago in 78a4357
CI github-actions:test 5 runs
Average
41 ms
median 41 ms
max 57 ms
Phases
Setup 0.86 ms Call 40 ms Teardown 0.16 ms
Categories
Database 5 ms Other (Libraries, Unsampled, pytest, Serialization) 36 ms

11 database queries per run

Needs 318 KB of memory (max 472 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, an hour ago · open run
Show pytest frames
call40 ms97.5%
ProfileUploadTest.test_reject_too_largeapps/api/tests.py:612 response = self.upload(body)33 ms79.7%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(33 ms79.7%
Client.postdjango/test/client.py:115333 ms79.7%
RequestFactory.postdjango/test/client.py:49933 ms79.7%
RequestFactory.genericdjango/test/client.py:67133 ms79.7%
Client.requestdjango/test/client.py:108233 ms79.7%
ClientHandler.__call__django/test/client.py:17329 ms70.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6229 ms70.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10429 ms70.9%
WhiteNoise.add_fileswhitenoise/base.py:10829 ms70.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12022 ms53.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13122 ms53.2%
WhiteNoise.get_static_filewhitenoise/base.py:20818 ms44.3%
StaticFile.__init__whitenoise/responders.py:747 ms17.7%
parsedate<stdlib>/email/_parseaddr.py:1857 ms17.7%
StaticFile.__init__whitenoise/responders.py:727 ms17.7%
StaticFile.get_file_statswhitenoise/responders.py:1617 ms17.7%
StaticFile.__init__whitenoise/responders.py:734 ms8.9%
StaticFile.get_headerswhitenoise/responders.py:1714 ms8.9%
WhiteNoise.get_static_filewhitenoise/base.py:2024 ms8.9%
WhiteNoise.add_mime_headerswhitenoise/base.py:2164 ms8.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1157 ms17.7%
scantreewhitenoise/base.py:2627 ms17.7%
scantreewhitenoise/base.py:2627 ms17.7%
scantreewhitenoise/base.py:2644 ms8.9%
<GC>~4 ms8.9%
ClientHandler.__call__django/test/client.py:1864 ms8.9%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms8.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.9%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms8.9%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms8.9%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms8.9%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms8.9%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))4 ms8.9%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)4 ms8.9%
QuerySet.__iter__django/db/models/query.py:3904 ms8.9%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms8.9%
FlatValuesListIterable.__iter__django/db/models/query.py:2774 ms8.9%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15734 ms8.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16244 ms8.9%
CursorWrapper.executedjango/db/backends/utils.py:794 ms8.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms8.9%
CursorWrapper._executedjango/db/backends/utils.py:1054 ms8.9%
Cursor.executepsycopg/cursor.py:1134 ms8.9%
Connection.waitpsycopg/connection.py:4954 ms8.9%
ProfileUploadTest.test_reject_too_largeapps/api/tests.py:610 body = gzip.compress(json.dumps(self.document()).encode())4 ms8.9%
dumps<stdlib>/json/__init__.py:2344 ms8.9%
JSONEncoder.encode<stdlib>/json/encoder.py:2024 ms8.9%
JSONEncoder.iterencode<stdlib>/json/encoder.py:2634 ms8.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms8.9%
TestCase._fixture_teardowndjango/test/testcases.py:14954 ms8.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4844 ms8.9%
CursorWrapper.executedjango/db/backends/utils.py:794 ms8.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms8.9%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms8.9%
Cursor.executepsycopg/cursor.py:1134 ms8.9%
Connection.waitpsycopg/connection.py:4954 ms8.9%
Estimated from 11 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
29 ms
apps/api/tests.py:610
body = gzip.compress(json.dumps(self.document()).encode())
ProfileUploadTest.test_reject_too_large · Serialization
4 ms
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token · Database
4 ms

Fixtures

Exact setup time
_template_string_if_invalid_marker function 0.06 ms
_django_db_marker function 0.05 ms
_dj_autoclear_mailbox function 0.05 ms
_live_server_helper function 0.05 ms
_django_set_urlconf function 0.05 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.03 ms

Database

11 queries · 3 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:612
37 ms
call _post_teardown
django/test/testcases.py:1240
4 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
an hour ago CI github-actions:test passed 42 ms 9caa567 main Profile
an hour ago CI github-actions:test passed 41 ms ec75501 main Profile
8 hours ago CI github-actions:test passed 57 ms d2c12e5 main Profile
8 hours ago CI github-actions:test passed 26 ms 0b902f6 main Profile
8 hours ago CI github-actions:test passed 41 ms 78a4357 main Profile