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

ProfileUploadTest::test_reject_missing_run

First seen 1 month, 1 week ago in 78a4357
CI github-actions:test 15 runs
Average
34 ms
median 38 ms
max 46 ms
Phases
Setup 0.66 ms Call 33 ms Teardown 0.15 ms
Categories
Database 9 ms App code 0.13 ms Other (Libraries, Unsampled, pytest, Logging) 25 ms

10 database queries per run

Needs 369 KB of memory (max 808 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call23 ms97.1%
ProfileUploadTest.test_reject_missing_runapps/api/tests.py:596 response = self.upload({"format": "flakytest-profile"})21 ms89.0%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(21 ms89.0%
Client.postdjango/test/client.py:115321 ms89.0%
RequestFactory.postdjango/test/client.py:49921 ms89.0%
RequestFactory.genericdjango/test/client.py:67121 ms89.0%
Client.requestdjango/test/client.py:108221 ms89.0%
ClientHandler.__call__django/test/client.py:17315 ms64.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6215 ms64.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10415 ms64.7%
WhiteNoise.add_fileswhitenoise/base.py:10815 ms64.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12014 ms56.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13114 ms56.6%
WhiteNoise.get_static_filewhitenoise/base.py:20810 ms40.4%
StaticFile.__init__whitenoise/responders.py:738 ms32.4%
StaticFile.get_headerswhitenoise/responders.py:1764 ms16.2%
formatdate<stdlib>/email/utils.py:2662 ms8.1%
StaticFile.get_headerswhitenoise/responders.py:1672 ms8.1%
StaticFile.get_headerswhitenoise/responders.py:1702 ms8.1%
StaticFile.__init__whitenoise/responders.py:722 ms8.1%
WhiteNoise.get_static_filewhitenoise/base.py:2034 ms16.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:2244 ms16.2%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms8.1%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms8.1%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms8.1%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms8.1%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1842 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.3%
BaseHandler.get_responsedjango/core/handlers/base.py:1416 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1306 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1236 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
MiddlewareMixin.__call__django/utils/deprecation.py:3096 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:346 ms24.3%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:556 ms24.3%
BaseHandler._get_responsedjango/core/handlers/base.py:1986 ms24.3%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:656 ms24.3%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:376 ms24.3%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:646 ms24.3%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))4 ms16.2%
cached_property.__get__django/utils/functional.py:472 ms8.1%
HttpRequest.headersdjango/http/request.py:892 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:1282 ms8.1%
Model.from_dbdjango/db/models/base.py:5992 ms8.1%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms8.1%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms8.1%
QuerySet.updatedjango/db/models/query.py:13002 ms8.1%
Query.get_compilerdjango/db/models/sql/query.py:3692 ms8.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms8.1%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms8.1%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms8.1%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 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
15 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 · Libraries
4 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
_dj_autoclear_mailbox function 0.05 ms
_django_set_urlconf function 0.04 ms
_template_string_if_invalid_marker function 0.03 ms
_django_db_marker 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:596
21 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 24 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 43 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 20 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 46 ms e141198 main Profile
1 month ago CI github-actions:test passed 23 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 41 ms afde85b main Profile
1 month ago CI github-actions:test passed 29 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 39 ms 044719a main Profile
1 month ago CI github-actions:test passed 24 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 40 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 41 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 37 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 41 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 25 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 38 ms 78a4357 main Profile