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

TestInvalidIngest::test_ingest_invalid

First seen 2 years, 10 months ago in 9ff0a7e
CI github-actions:test 12 runs
Average
99 ms
median 62 ms
max 220 ms
Phases
Setup 11 ms Call 87 ms Teardown 0.17 ms
Categories
Database 27 ms App code 0.37 ms Other (Libraries, pytest, Unsampled) 71 ms

15 database queries per run

Needs 72 KB of memory (max 260 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
setup11 ms17.8%
TestCase.setUpClassdjango/test/testcases.py:1423 cls.cls_atomics = cls._enter_atomics()10 ms16.0%
TestCase._enter_atomicsdjango/test/testcases.py:139610 ms16.0%
Atomic.__enter__django/db/transaction.py:19810 ms16.0%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45410 ms16.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30310 ms16.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms16.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms16.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms16.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2569 ms14.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:269 ms14.2%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:3339 ms14.2%
Connection.connectpsycopg/connection.py:1099 ms14.2%
wait_connpsycopg/waiting.py:1415 ms8.9%
EpollSelector.select<stdlib>/selectors.py:4525 ms8.9%
wait_connpsycopg/waiting.py:1453 ms5.3%
BaseConnection._connect_genpsycopg/_connection_base.py:4393 ms5.3%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:2581 ms1.8%
DatabaseWrapper.init_connection_statedjango/db/backends/postgresql/base.py:4021 ms1.8%
DatabaseWrapper._configure_connectiondjango/db/backends/postgresql/base.py:3741 ms1.8%
DatabaseWrapper._configure_timezonedjango/db/backends/postgresql/base.py:3571 ms1.8%
Cursor.executepsycopg/cursor.py:1131 ms1.8%
Connection.waitpsycopg/connection.py:4951 ms1.8%
__init____init__:-11 ms1.8%
signature<stdlib>/inspect.py:33431 ms1.8%
Signature.from_callable<stdlib>/inspect.py:30581 ms1.8%
_signature_from_callable<stdlib>/inspect.py:25281 ms1.8%
call50 ms82.0%
TestInvalidIngest.test_ingest_invalidapps/api/tests.py:58 response = self.client.post(35 ms57.4%
Client.postdjango/test/client.py:115335 ms57.4%
RequestFactory.postdjango/test/client.py:49935 ms57.4%
RequestFactory.genericdjango/test/client.py:67135 ms57.4%
Client.requestdjango/test/client.py:108235 ms57.4%
ClientHandler.__call__django/test/client.py:17322 ms36.9%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6222 ms36.9%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10422 ms36.9%
WhiteNoise.add_fileswhitenoise/base.py:10822 ms36.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12020 ms32.8%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13117 ms28.7%
WhiteNoise.get_static_filewhitenoise/base.py:20815 ms24.6%
StaticFile.__init__whitenoise/responders.py:737 ms12.3%
StaticFile.get_headerswhitenoise/responders.py:1785 ms8.2%
parsedate<stdlib>/email/_parseaddr.py:1855 ms8.2%
parsedate_tz<stdlib>/email/_parseaddr.py:502 ms4.1%
_parsedate_tz<stdlib>/email/_parseaddr.py:1442 ms4.1%
StaticFile.get_headerswhitenoise/responders.py:1762 ms4.1%
formatdate<stdlib>/email/utils.py:2662 ms4.1%
format_datetime<stdlib>/email/utils.py:2842 ms4.1%
StaticFile.__init__whitenoise/responders.py:775 ms8.2%
StaticFile.get_alternativeswhitenoise/responders.py:2005 ms8.2%
__init____init__:-12 ms4.1%
StaticFile.__init__whitenoise/responders.py:742 ms4.1%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1152 ms4.1%
scantreewhitenoise/base.py:2622 ms4.1%
scantreewhitenoise/base.py:2622 ms4.1%
scantreewhitenoise/base.py:2642 ms4.1%
ClientHandler.__call__django/test/client.py:18610 ms16.4%
BaseHandler.get_responsedjango/core/handlers/base.py:14110 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13010 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12310 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
MiddlewareMixin.__call__django/utils/deprecation.py:30910 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3410 ms16.4%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5510 ms16.4%
BaseHandler._get_responsedjango/core/handlers/base.py:19810 ms16.4%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6510 ms16.4%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3710 ms16.4%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6410 ms16.4%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))7 ms12.3%
Atomic.__enter__django/db/transaction.py:2112 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4002 ms4.1%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3672 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms4.1%
QuerySet.__iter__django/db/models/query.py:3902 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.1%
FlatValuesListIterable.__iter__django/db/models/query.py:2772 ms4.1%
SQLCompiler.results_iterdjango/db/models/sql/compiler.py:15732 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:3182 ms4.1%
Atomic.__exit__django/db/transaction.py:2472 ms4.1%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:262 ms4.1%
BaseDatabaseWrapper.savepoint_commitdjango/db/backends/base/base.py:4312 ms4.1%
BaseDatabaseWrapper._savepoint_commitdjango/db/backends/base/base.py:3752 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1032 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.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 ms4.1%
get_object_or_404django/shortcuts.py:902 ms4.1%
QuerySet.getdjango/db/models/query.py:6352 ms4.1%
QuerySet.__len__django/db/models/query.py:3722 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.1%
ModelIterable.__iter__django/db/models/query.py:952 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
ClientHandler.__call__django/test/client.py:1752 ms4.1%
TestInvalidIngest.test_ingest_invalidapps/api/tests.py:55 project = make_project("test")15 ms24.6%
make_projectapps/projects/testing.py:625 ms8.2%
unique_slugapps/orgs/models.py:44 base = slugify(name)[:40].strip("-") or fallback2 ms4.1%
keep_lazy.<locals>.decorator.<locals>.wrapperdjango/utils/functional.py:2312 ms4.1%
slugifydjango/utils/text.py:4852 ms4.1%
sub<stdlib>/re/__init__.py:2102 ms4.1%
_compile<stdlib>/re/__init__.py:3522 ms4.1%
compile<stdlib>/re/_compiler.py:7662 ms4.1%
_code<stdlib>/re/_compiler.py:5962 ms4.1%
_compile_info<stdlib>/re/_compiler.py:5462 ms4.1%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():2 ms4.1%
QuerySet.existsdjango/db/models/query.py:13372 ms4.1%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
make_projectapps/projects/testing.py:61 organization = Organization.objects.create(5 ms8.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:875 ms8.2%
QuerySet.createdjango/db/models/query.py:6592 ms4.1%
cached_property.__get__django/utils/functional.py:472 ms4.1%
Options._reverse_one_to_one_field_namesdjango/db/models/options.py:10302 ms4.1%
cached_property.__get__django/utils/functional.py:472 ms4.1%
Options.related_objectsdjango/db/models/options.py:6212 ms4.1%
Options._get_fieldsdjango/db/models/options.py:9432 ms4.1%
cached_property.__get__django/utils/functional.py:472 ms4.1%
Options._relation_treedjango/db/models/options.py:8432 ms4.1%
Options._populate_directed_relation_graphdjango/db/models/options.py:8192 ms4.1%
Options._get_fieldsdjango/db/models/options.py:9632 ms4.1%
QuerySet.createdjango/db/models/query.py:6692 ms4.1%
Model.savedjango/db/models/base.py:8742 ms4.1%
Model.save_basedjango/db/models/base.py:9662 ms4.1%
Model._save_tabledjango/db/models/base.py:11672 ms4.1%
Model._do_insertdjango/db/models/base.py:12182 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet._insertdjango/db/models/query.py:19182 ms4.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
make_projectapps/projects/testing.py:67 slug=unique_slug(name, organization.project_set.all(), fallback="project", reserved=RESERVED_PROJECT_SLUGS),2 ms4.1%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():2 ms4.1%
QuerySet.existsdjango/db/models/query.py:13372 ms4.1%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.1%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms4.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms4.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms4.1%
make_projectapps/projects/testing.py:64 project = Project.objects.create(2 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet.createdjango/db/models/query.py:6692 ms4.1%
Model.savedjango/db/models/base.py:8742 ms4.1%
Model.save_basedjango/db/models/base.py:9662 ms4.1%
Model._save_tabledjango/db/models/base.py:11672 ms4.1%
Model._do_insertdjango/db/models/base.py:12182 ms4.1%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.1%
QuerySet._insertdjango/db/models/query.py:19182 ms4.1%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19252 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.1%
Cursor.executepsycopg/cursor.py:1132 ms4.1%
Connection.waitpsycopg/connection.py:4952 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2052 ms4.1%
BaseCursor._convert_querypsycopg/_cursor_base.py:4652 ms4.1%
PostgresClientQuery.convertpsycopg/_queries.py:2842 ms4.1%
_query2pg_client_nocachepsycopg/_queries.py:3292 ms4.1%
_split_querypsycopg/_queries.py:4432 ms4.1%
<lambda><string>:12 ms4.1%
<GC>~2 ms4.1%
Estimated from 30 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/api/tests.py:58
response = self.client.post(
TestInvalidIngest.test_ingest_invalid · Libraries
25 ms
apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug · Database
5 ms
apps/projects/testing.py:61
organization = Organization.objects.create(
make_project · Database
5 ms
apps/api/urls.py:73
touch_token(request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view · Database
5 ms
apps/orgs/models.py:44
base = slugify(name)[:40].strip("-") or fallback
unique_slug · Libraries
2 ms
apps/projects/testing.py:64
project = Project.objects.create(
make_project · Database
2 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
_unittest_setUpClass_fixture_TestInvalidIngest class 10 ms
_django_setup_unittest class 0.19 ms
_template_string_if_invalid_marker function 0.06 ms
_django_db_marker function 0.06 ms
_dj_autoclear_mailbox function 0.04 ms
_django_set_urlconf function 0.03 ms
_live_server_helper function 0.03 ms
monkeypatch function 0.03 ms
_django_clear_site_cache function 0.02 ms

Database

15 queries · 7 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:55
50 ms
setup setUpClass
django/test/testcases.py:1423
10 ms
setup __init__
__init__:-1
1 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 61 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 54 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 49 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 74 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 34 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 220 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 188 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 212 ms ec75501 main Profile
2 weeks, 6 days ago CI github-actions:test passed 164 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 35 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 63 ms 78a4357 main Profile