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

TestInvalidIngest::test_ingest_no_token

First seen 2 years, 11 months ago in 9ff0a7e
CI github-actions:test 15 runs
Average
53 ms
median 49 ms
max 156 ms
Phases
Setup 0.65 ms Call 52 ms Teardown 0.95 ms
Categories
Database 4 ms Other (Libraries, Unsampled, pytest, Logging) 50 ms

6 database queries per run

Needs 7 KB of memory (max 64 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 2 weeks ago · open run
Show pytest frames
call36 ms97.1%
TestInvalidIngest.test_ingest_no_tokenapps/api/tests.py:49 response = self.client.post("/api/v1/ingest/start", content_type="application/json")34 ms91.7%
Client.postdjango/test/client.py:115334 ms91.7%
RequestFactory.postdjango/test/client.py:49934 ms91.7%
RequestFactory.genericdjango/test/client.py:67134 ms91.7%
Client.requestdjango/test/client.py:108234 ms91.7%
ClientHandler.__call__django/test/client.py:18622 ms59.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14122 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13022 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12322 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30922 ms59.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5522 ms59.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3520 ms54.0%
_should_redirect_accountsallauth/account/middleware.py:6720 ms54.0%
reversedjango/urls/base.py:9818 ms48.6%
URLResolver._reverse_with_prefixdjango/urls/resolvers.py:76018 ms48.6%
URLResolver._populatedjango/urls/resolvers.py:58418 ms48.6%
URLResolver._populatedjango/urls/resolvers.py:58414 ms37.8%
URLResolver._populatedjango/urls/resolvers.py:56312 ms32.4%
normalizedjango/utils/regex_helper.py:1546 ms16.2%
<GC>~6 ms16.2%
normalizedjango/utils/regex_helper.py:1934 ms10.8%
flatten_resultdjango/utils/regex_helper.py:3112 ms5.4%
normalizedjango/utils/regex_helper.py:1122 ms5.4%
URLResolver._populatedjango/urls/resolvers.py:5732 ms5.4%
flatten_resultdjango/utils/regex_helper.py:3382 ms5.4%
URLResolver._populatedjango/urls/resolvers.py:5592 ms5.4%
LocaleRegexRouteDescriptor.__get__django/urls/resolvers.py:3042 ms5.4%
compile<stdlib>/re/__init__.py:2912 ms5.4%
_compile<stdlib>/re/__init__.py:3522 ms5.4%
compile<stdlib>/re/_compiler.py:7622 ms5.4%
parse<stdlib>/re/_parser.py:9722 ms5.4%
_parse_sub<stdlib>/re/_parser.py:4592 ms5.4%
_parse<stdlib>/re/_parser.py:7242 ms5.4%
URLResolver._populatedjango/urls/resolvers.py:5982 ms5.4%
normalizedjango/utils/regex_helper.py:1932 ms5.4%
reversedjango/urls/base.py:392 ms5.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:342 ms5.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:552 ms5.4%
BaseHandler._get_responsedjango/core/handlers/base.py:1982 ms5.4%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:652 ms5.4%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:372 ms5.4%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:642 ms5.4%
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.4%
get_object_or_404django/shortcuts.py:902 ms5.4%
QuerySet.getdjango/db/models/query.py:6272 ms5.4%
QuerySet.order_bydjango/db/models/query.py:17702 ms5.4%
QuerySet._chaindjango/db/models/query.py:19732 ms5.4%
QuerySet._clonedjango/db/models/query.py:19862 ms5.4%
Query.chaindjango/db/models/sql/query.py:4332 ms5.4%
Query.clonedjango/db/models/sql/query.py:4252 ms5.4%
ClientHandler.__call__django/test/client.py:17312 ms32.4%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6212 ms32.4%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10412 ms32.4%
WhiteNoise.add_fileswhitenoise/base.py:10812 ms32.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1206 ms16.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:1316 ms16.2%
WhiteNoise.get_static_filewhitenoise/base.py:2012 ms5.4%
__init____init__:-12 ms5.4%
WhiteNoise.get_static_filewhitenoise/base.py:2032 ms5.4%
WhiteNoise.add_cache_headerswhitenoise/base.py:2242 ms5.4%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms5.4%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms5.4%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms5.4%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2052 ms5.4%
HashedFilesMixin._urldjango/contrib/staticfiles/storage.py:1842 ms5.4%
WhiteNoise.get_static_filewhitenoise/base.py:2082 ms5.4%
StaticFile.__init__whitenoise/responders.py:732 ms5.4%
StaticFile.get_headerswhitenoise/responders.py:1782 ms5.4%
parsedate<stdlib>/email/_parseaddr.py:1852 ms5.4%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms5.4%
_parsedate_tz<stdlib>/email/_parseaddr.py:1632 ms5.4%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1154 ms10.8%
scantreewhitenoise/base.py:2624 ms10.8%
scantreewhitenoise/base.py:2622 ms5.4%
scantreewhitenoise/base.py:2602 ms5.4%
scantreewhitenoise/base.py:2602 ms5.4%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms5.4%
TestCase._fixture_teardowndjango/test/testcases.py:14942 ms5.4%
TestCase._should_check_constraintsdjango/test/testcases.py:15032 ms5.4%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:4922 ms5.4%
Cursor.executepsycopg/cursor.py:1132 ms5.4%
Connection.waitpsycopg/connection.py:4952 ms5.4%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms5.4%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms5.4%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms5.4%
Estimated from 18 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/api/tests.py:49
response = self.client.post("/api/v1/ingest/start", content_type="application/json")
TestInvalidIngest.test_ingest_no_token · Libraries
32 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
_django_db_marker function 0.03 ms
_template_string_if_invalid_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.01 ms

Database

6 queries · 0.84 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:49
34 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 37 ms cb18ed3 main Profile
2 weeks, 4 days ago CI github-actions:test passed 62 ms 9bd5864 main Profile
2 weeks, 6 days ago CI github-actions:test passed 32 ms 19dac9b main Profile
3 weeks ago CI github-actions:test passed 67 ms e141198 main Profile
1 month ago CI github-actions:test passed 27 ms 46ec2aa main Profile
1 month ago CI github-actions:test passed 50 ms afde85b main Profile
1 month ago CI github-actions:test passed 40 ms fe29f9d main Profile
1 month ago CI github-actions:test passed 69 ms 044719a main Profile
1 month ago CI github-actions:test passed 35 ms b3fedae main Profile
1 month, 1 week ago CI github-actions:test passed 51 ms 43c4eda main Profile
1 month, 1 week ago CI github-actions:test passed 51 ms 9caa567 main Profile
1 month, 1 week ago CI github-actions:test passed 49 ms ec75501 main Profile
1 month, 1 week ago CI github-actions:test passed 156 ms d2c12e5 main Profile
1 month, 1 week ago CI github-actions:test passed 26 ms 0b902f6 main Profile
1 month, 1 week ago CI github-actions:test passed 49 ms 78a4357 main Profile