flakytest.dev anze3db fedidevs
Profiles / #1

Passed Run of Oct 18, 11:03

CI github-actions:test · ab6465a main dirty · pass/fail report
Some tests got too few samples to explain their time. Rerun with pytest --flakytest-profile --flakytest-rate 2000.
Wall time
51.23 s
4 workers
Test time
2m 37s
sum of test durations
Tests
301
301 passed
Profiler
py-spy
500 Hz · 56,990 samples · Python 3.14.8 · flakytest 2026.0b1
Peak memory
679 MB
4 workers together

Where the time goes

Test time by category
  • Password hashing50.46 s
  • Migrations39.56 s
  • Libraries38.03 s
  • Database12.33 s
  • DB schema4.77 s
  • Mocking3.66 s
  • Imports2.83 s
  • Templates2.76 s
  • pytest778 ms
  • Factories726 ms
  • Unsampled299 ms
  • App code87 ms
  • Waiting53 ms
  • Deep copies52 ms
  • Test code47 ms
  • Network40 ms
  • Cache36 ms
  • Logging32 ms
  • Serialization4 ms

Session timeline

Other
4.14 s
Tests
2m 44s
Startup
3.26 s
Collection
428 ms
Between tests
3.03 s
Test phases
Setup 44.40 s Call 1m 51s Teardown 820 ms

Fix next

Ranked by the time each fix saves per run
1

Use plain static file storage in tests

Static file storage/manifest handling costs 48.1s.

High App code
48.12 s per run
Fix: In test settings use STORAGES["staticfiles"] = {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"} so templates don't need a manifest.
Details

Where:

  • starter_packs/tests.py:840 test_api_formats · 1.78 s
  • accounts/tests.py:550 assert_noindex · 1.34 s
  • accounts/views.py:428 index · 1.24 s
  • accounts/tests.py:555 assert_indexable · 1.01 s
  • starter_packs/tests.py:780 test_order_by · 997 ms
  • confs/tests.py:152 _assert_no_naive_warning · 779 ms
  • confs/tests.py:1132 test_mastodon_url_is_kept · 755 ms
  • starter_packs/tests.py:1036 test_no_pin_button_on_share_page · 734 ms
  • confs/tests.py:884 test_conference_with_pacific_with_date · 571 ms
  • confs/views.py:299 _conference_detail · 493 ms

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • confs/tests.py::TestCreateConference::test_mastodon_url_is_kept
  • starter_packs/tests.py::TestPinAccountInStarterPack::test_no_pin_button_on_share_page
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestConferencePage::test_conference_with_pacific_with_date
  • starter_packs/tests.py::TestShareStarterPack::test_api_formats_1___application_ld_json__profile__https___www_w3_org_ns_activitystreams_____application_activity_json__
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • starter_packs/tests.py::TestEditStarterPack::test_not_owned_starter_pack
2

Use a fast password hasher in tests

50.5s (32% of test time) is spent hashing passwords. Slow hashing protects real passwords; in tests it only burns CPU.

High Password hashing
47.93 s per run
Fix: In your test settings set PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] (currently PBKDF2PasswordHasher).
Details

Only change the hasher in test settings. Tests that assert on a specific hash format need updating.

Where:

  • confs/tests.py:1044 setUp · 9.89 s
  • confs/tests.py:1175 setUp · 8.41 s
  • confs/tests.py:1177 setUp · 6.78 s
  • confs/tests.py:1176 setUp · 5.52 s
  • confs/tests.py:1372 setUp · 4.71 s
  • confs/tests.py:1371 setUp · 4.27 s
  • confs/tests.py:1317 setUp · 3.93 s
  • confs/tests.py:1316 setUp · 2.93 s
  • confs/tests.py:1296 setUp · 1.25 s
  • fedidevs/tests.py:62 test_authenticated_html_is_private_and_keeps_csrf_header · 1.19 s

Most affected tests:

  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_requires_login
  • confs/tests.py::TestEditConference::test_owner_sees_edit_button_on_approved_detail
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_owner_can_view_edit_form
  • confs/tests.py::TestApproveConference::test_non_staff_forbidden

Documentation

3

Stop re-running migrations on every test run

Migrations take 39.6s per run, before the first test can start.

High Migrations
35.60 s per run
Fix: Run with --reuse-db (add it to addopts in pytest.ini/pyproject) so the test database survives between runs; pass --create-db when migrations change. If no test depends on data migrations, --nomigrations builds the schema straight from the models, which is faster still.
Details

CI should still build the database from scratch (no --reuse-db) so broken migrations are caught.

Where:

  • confs/tests.py:432 _migrate · 2.20 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 704 ms
  • confs/tests.py:412 _leaf_targets · 267 ms
  • confs/tests.py:431 _migrate · 129 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 86 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 50 ms
  • confs/migrations/0011_conferencepost_alter_conference_posts.py:11 update · 41 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:398 migrate_legacy_pair · 38 ms
  • starter_packs/migrations/0004_starterpack_published_at.py:9 set_published_at · 38 ms
  • accounts/migrations/0035_fix_misskey_activitypub_id.py:22 fix_misskey_activitypub_ids · 37 ms

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestLegacyConferenceDataMigration::test_copies_overlapping_legacy_rows_without_clobbering_existing_data
  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes

Documentation

4

Create shared test data in setUpTestData instead of setUp

setUp() runs before every test and takes 48.9s in total (password hashing 48.6s, db 326ms, factories 17ms) in 7 classes: TestPostAnnouncements (6 tests), TestFollowStarterPack (3 tests), TestCreateConference (10 tests), TestConferenceApprovalVisibility (5 tests).

High Database
34.25 s per run
Fix: Move object creation that tests only read from setUp() into `@classmethod def setUpTestData(cls)`: it runs once per class and each test still sees the original rows (TestCase rolls back to a savepoint).
Details

Since Django 3.2 attributes assigned in setUpTestData are deep-copied per test, so in-memory changes don't leak between tests. Keep objects a test modifies in the database (or re-fetches) as before.

Where:

  • confs/tests.py:1044 setUp · 9.94 s
  • confs/tests.py:1175 setUp · 8.42 s
  • confs/tests.py:1177 setUp · 6.80 s
  • confs/tests.py:1176 setUp · 5.54 s
  • confs/tests.py:1372 setUp · 4.72 s
  • confs/tests.py:1371 setUp · 4.28 s
  • confs/tests.py:1317 setUp · 3.94 s
  • confs/tests.py:1316 setUp · 2.94 s
  • confs/tests.py:1296 setUp · 1.25 s
  • confs/tests.py:1295 setUp · 883 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_requires_login
  • confs/tests.py::TestEditConference::test_owner_sees_edit_button_on_approved_detail
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_owner_can_view_edit_form
  • confs/tests.py::TestApproveConference::test_non_staff_forbidden

Documentation

5

Repeated queries (N+1) in the code under test

10 tests run the same query 10+ times, e.g. 45x in test_single_facet_is_indexable. N+1 queries slow the tests and production alike.

Medium Database
14.78 s per run
Fix: Django: fetch related rows in one query with select_related() for foreign keys and prefetch_related() for reverse/many-to-many relations, then lock the count in with assertNumQueries (or pytest-django's django_assert_num_queries).
Details

This changes application code, so it speeds up production too; the tests stay as they are.

  • 45x in test_single_facet_is_indexable: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_conference_with_utc_with_date_no_posts: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_invalid_selected_instance: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 45x in test_djangoconus_old_url_redirects: SELECT "confs_conferencetag"."id", "confs_conferencetag"."name", "confs_conferencetag"."slug", "confs_conferencetag"."icon" FROM "confs_conferencetag" WHERE "confs_conferencetag"."slug" = %s LIMIT ? FOR UPDATE
  • 44x in test_posts_from_yesterday_are_updated: SELECT COUNT(*) AS "__count" FROM "accounts_accountlookup" WHERE UPPER("accounts_accountlookup"."language"::text) LIKE UPPER(%s)

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • stats/tests.py::TestStats::test_posts_from_yesterday_are_updated
  • stats/tests.py::TestStats::test_store_daily_stats
  • stats/tests.py::TestStats::test_store_daily_stats_with_accounts
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

6

Make the test database server skip durability work

Tests spend 56.7s (36%) in the database. Test databases don't need to survive a crash, so the server can skip flushing to disk.

Medium Database
11.33 s per run
Fix: For a PostgreSQL test server (Docker/CI service) start it with -c fsync=off -c synchronous_commit=off -c full_page_writes=off, and put its data directory on tmpfs; for MySQL use --innodb-flush-log-at-trx-commit=0 --skip-log-bin. Never on a server with data you need.
Details

Only affects crash safety of the throwaway test server; query behaviour is identical.

Where:

  • confs/tests.py:432 _migrate · 2.20 s
  • starter_packs/tests.py:396 test_toggle_after_limit · 1.15 s
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 704 ms
  • stats/models.py:20 store_daily_stats · 335 ms
  • stats/models.py:12 store_daily_stats · 272 ms
  • confs/tests.py:412 _leaf_targets · 267 ms
  • starter_packs/tests.py:763 _set_up_orderable_accounts · 188 ms
  • starter_packs/views.py:729 share_starter_pack · 157 ms
  • accounts/views.py:295 index · 149 ms
  • accounts/views.py:28 __init__ · 143 ms

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • confs/tests.py::TestLegacyConferenceDataMigration::test_copies_overlapping_legacy_rows_without_clobbering_existing_data
  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes
  • starter_packs/tests.py::TestToggleStarterPackAccount::test_toggle_after_limit
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

7

Disable django-debug-toolbar in tests

django-debug-toolbar is installed in the test settings and costs 10.0s.

Medium App code
10.04 s per run
Fix: Only add debug_toolbar to INSTALLED_APPS and MIDDLEWARE when not testing (e.g. `if DEBUG and not TESTING:`).
Details

Where:

  • accounts/views.py:428 index · 1.24 s
  • confs/views.py:299 _conference_detail · 493 ms
  • starter_packs/views.py:865 share_starter_pack · 393 ms
  • confs/views.py:512 create_conference · 227 ms
  • confs/views.py:131 conferences · 178 ms
  • starter_packs/views.py:188 starter_packs · 177 ms
  • starter_packs/tests.py:840 test_api_formats · 174 ms
  • starter_packs/views.py:729 share_starter_pack · 157 ms
  • accounts/views.py:295 index · 149 ms
  • accounts/tests.py:550 assert_noindex · 145 ms

Most affected tests:

  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • confs/tests.py::TestMigratedLegacyConferences::test_dotnetconf_page
  • confs/tests.py::TestCreateConference::test_rejects_more_than_three_icons
  • confs/tests.py::TestEditConference::test_owner_can_view_edit_form
  • accounts/tests.py::TestSelectedInstance::test_unselected_instance
  • confs/tests.py::TestCreateConference::test_form_renders_for_authenticated_user

Documentation

8

Use TestCase instead of TransactionTestCase

1.7s goes to flushing every table after tests in 2 TransactionTestCase / transaction=True / live_server tests.

Low DB schema
1.49 s per run
Fix: Use django.test.TestCase (or @pytest.mark.django_db without transaction=True): it wraps each test in a transaction and rolls back instead of truncating every table. Keep TransactionTestCase only for tests that need real commits (on_commit hooks can use TestCase.captureOnCommitCallbacks).
Details

Tests that rely on commit behaviour, multiple connections or a live server still need a transactional test case.

Most affected tests:

  • confs/tests.py::TestLegacyConferenceDataMigration::test_drops_legacy_tables_when_uniques_are_mysql_style_indexes
  • accounts/tests.py::TestInstanceIndexingBridgy::test_follows_redirect_and_coerces_null_version

Documentation

Tests

201–301 of 301, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
starter_packs/tests.py::TestOwnerManagement::test_pending_invitation_shown_on_starter_packs_page
passed 161 ms 1 ms 159 ms 0.35 ms Libraries 28
mastodon_auth/tests.py::MastodonLoginFormTests::test_cleans_instance_to_ascii_hostname
passed 159 ms 18 ms 140 ms 0.37 ms Imports 5
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_access_denied_is_logged_as_warning_not_error
passed 155 ms 4 ms 150 ms 0.35 ms Libraries 5
starter_packs/tests.py::TestStarterPacks::test_index_page_logged_in
passed 154 ms 3 ms 150 ms 0.37 ms Libraries 26
starter_packs/tests.py::TestRemoteFollowStarterPack::test_share_page_hides_remote_follow_form_when_logged_in
passed 153 ms 27 ms 126 ms 0.32 ms Database 35
posts/tests.py::TestDjangoConUSLegacyRedirect::test_djangoconus_redirects_to_conference_page
passed 144 ms 1 ms 139 ms 4 ms Libraries 5
starter_packs/tests.py::TestCreateStarterPack::test_create_starter_pack
passed 143 ms 2 ms 141 ms 0.34 ms Libraries 38
6 repeated
starter_packs/tests.py::TestOwnerManagement::test_removing_self_redirects_home
passed 140 ms 1 ms 135 ms 3 ms Libraries 27
starter_packs/tests.py::TestShareStarterPack::test_languages_hidden_when_unset
passed 138 ms 1 ms 137 ms 0.37 ms Libraries 12
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_keyerror_without_token_errors
passed 136 ms 3 ms 133 ms 0.31 ms Mocking 8
posts/tests.py::TestDjangoConUSLegacyRedirect::test_djangoconus_date_redirects
passed 136 ms 23 ms 113 ms 0.32 ms Libraries 5
starter_packs/tests.py::TestOwnerManagement::test_search_excludes_invited_users
passed 132 ms 1 ms 130 ms 0.44 ms Libraries 29
confs/tests.py::TestSyncAnnouncements::test_creates_and_links_start_and_end_announcements
passed 130 ms 32 ms 98 ms 0.35 ms Database 13
fedidevs/tests.py::TestAccountIndexQueryParams::test_language_index_strips_unknown_params
passed 128 ms 4 ms 124 ms 0.31 ms Libraries –
starter_packs/tests.py::TestFollowBg::test_continues_after_other_errors
passed 123 ms 86 ms 37 ms 0.33 ms Database 25
12 repeated
starter_packs/tests.py::TestOwnerManagement::test_creator_removed_from_owners_loses_access
passed 117 ms 1 ms 115 ms 0.31 ms Libraries 25
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_missing_code_state_is_logged_at_error
passed 115 ms 1 ms 113 ms 0.28 ms Libraries 5
confs/tests.py::TestMigratedLegacyConferences::test_djangoconafrica_date_redirects
passed 114 ms 2 ms 112 ms 0.46 ms Libraries 5
stats/tests.py::TestStarterPackStats::test_starter_pack_stats
passed 113 ms 26 ms 86 ms 0.89 ms Database 25
15 repeated
starter_packs/tests.py::TestOwnerManagement::test_added_owner_who_is_not_creator_can_edit
passed 110 ms 1 ms 108 ms 0.35 ms Libraries 26
starter_packs/tests.py::TestOwnerManagement::test_owner_handles_shown_on_list_card
passed 108 ms 1 ms 107 ms 0.33 ms Libraries 17
mastodon_auth/tests.py::RedirectToLocalViewTests::test_invalid_query_redirects_to_home
passed 107 ms 21 ms 86 ms 0.31 ms Libraries 5
starter_packs/tests.py::TestOwnerManagement::test_decline_invitation_removes_it
passed 105 ms 1 ms 103 ms 0.38 ms Libraries 27
starter_packs/tests.py::TestOwnerManagement::test_only_invited_user_can_accept
passed 105 ms 2 ms 103 ms 0.37 ms Libraries 31
starter_packs/tests.py::TestRemoteFollowStarterPack::test_share_page_shows_remote_follow_form_when_logged_out
passed 102 ms 1.00 ms 96 ms 5 ms Libraries 11
confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
passed 101 ms 1 ms 99 ms 0.28 ms Libraries 5
fedidevs/tests.py::TestRobotsTxt::test_disallows_query_strings_except_googlebot
passed 96 ms 2 ms 94 ms 0.41 ms Libraries –
announcements/tests.py::TestPostAnnouncements::test_does_not_repost_already_posted
passed 83 ms 21 ms 62 ms 0.30 ms Database 10
confs/tests.py::TestSyncAnnouncements::test_variation_is_stable_across_resyncs
passed 70 ms 7 ms 61 ms 1 ms Database 17
4 repeated
confs/tests.py::TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
passed 57 ms 1 ms 56 ms 0.34 ms Database 17
3 repeated
confs/tests.py::TestSyncAnnouncements::test_post_at_uses_conference_timezone
passed 50 ms 11 ms 39 ms 0.31 ms Database 12
confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
passed 49 ms 5 ms 44 ms 0.30 ms Database 18
4 repeated
announcements/tests.py::TestPostAnnouncements::test_skips_when_token_missing
passed 41 ms 4 ms 36 ms 0.96 ms Database 8
stats/tests.py::TestStats::test_all_daily_lang_stats
passed 38 ms 32 ms 6 ms 0.35 ms Database 5
starter_packs/tests.py::TestFollowBg::test_stops_after_unauthorized
passed 38 ms 8 ms 27 ms 4 ms Database 10
accounts/tests.py::TestCrawlerGotosocial::test_auth_gated_directory_caches_unknown_and_skips_misskey_probe
passed 37 ms 7 ms 31 ms 0.34 ms Waiting –
confs/tests.py::TestSyncAnnouncements::test_uses_one_of_the_message_variations
passed 37 ms 1 ms 36 ms 0.30 ms Database 13
starter_packs/tests.py::TestParseHandle::test_valid_handles
passed 34 ms 24 ms 9 ms 0.84 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account
passed 33 ms 9 ms 24 ms 0.30 ms Database 10
announcements/tests.py::TestPostAnnouncements::test_dry_run_is_the_default
passed 32 ms 3 ms 29 ms 0.29 ms Database 9
confs/tests.py::TestPostsAfterDatetime::test_aware_start_of_day_in_conference_timezone
passed 32 ms 22 ms 10 ms 0.30 ms Database 6
announcements/tests.py::TestPostAnnouncements::test_posts_only_due_announcements
passed 32 ms 4 ms 27 ms 0.31 ms Database 11
3 repeated
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match
passed 32 ms 13 ms 19 ms 0.32 ms Database 12
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_resolve_posts_does_not_scan_or_join_accounts_by_url
passed 31 ms 1 ms 27 ms 3 ms Database 9
starter_packs/tests.py::TestGetSubscribeUrl::test_no_subscribe_link
passed 31 ms 25 ms 6 ms 0.24 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_skips_past_and_archived_conferences
passed 31 ms 7 ms 24 ms 0.28 ms Database 9
announcements/tests.py::TestPostAnnouncements::test_records_error_and_leaves_row_unposted
passed 31 ms 0.96 ms 30 ms 0.31 ms Database 10
confs/tests.py::TestSyncAnnouncements::test_skips_pending_conferences
passed 30 ms 7 ms 23 ms 0.33 ms Database 8
starter_packs/tests.py::TestParseHandle::test_invalid_handles
passed 28 ms 18 ms 10 ms 1 ms Database 5
confs/tests.py::TestMigratedLegacyConferences::test_account_kwargs_from_json
passed 28 ms 22 ms 6 ms 0.25 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_respects_visibility
passed 20 ms 0.93 ms 19 ms 0.27 ms Database 10
mastodon_auth/tests.py::MastodonLoginFormTests::test_rejects_invalid_idna_hostname
passed 18 ms 4 ms 11 ms 3 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_url_when_ids_differ
passed 16 ms 1 ms 15 ms 0.34 ms Database 8
confs/tests.py::TestMigratedLegacyConferences::test_legacy_tables_were_dropped
passed 13 ms 3 ms 10 ms 0.28 ms Database 6
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_template_without_uri_placeholder
passed 12 ms 0.93 ms 11 ms 0.24 ms Database 5
confs/tests.py::TestPostsAfterDatetime::test_none_when_unset
passed 12 ms 3 ms 5 ms 3 ms Unsampled 6
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_resolves_missing_actor_uri_via_webfinger
passed 12 ms 1 ms 10 ms 0.39 ms Waiting –
mastodon_auth/tests.py::RegisterAppTests::test_raises_when_credentials_missing_from_body
passed 11 ms 4 ms 7 ms 0.33 ms pytest –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_invalid_json
passed 11 ms 2 ms 9 ms 0.22 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
passed 11 ms 1 ms 9 ms 0.28 ms Database 11
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_non_https_template
passed 11 ms 0.93 ms 9 ms 0.24 ms Database 5
confs/tests.py::TestConferenceOgImage::test_signature_changes_with_visible_content
passed 10 ms 1 ms 5 ms 5 ms Unsampled 6
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_on_non_gotosocial_leaves_uri_missing
passed 10 ms 6 ms 4 ms 0.27 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_none_status_on_network_error
passed 9 ms 3 ms 6 ms 0.32 ms Mocking –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_rejects_malformed_or_incomplete_urls
passed 9 ms 1 ms 8 ms 0.35 ms Unsampled –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_accepts_http_and_https_urls_with_host
passed 9 ms 2 ms 7 ms 0.27 ms Libraries –
starter_packs/tests.py::TestGetSubscribeUrl::test_returns_filled_template
passed 9 ms 0.88 ms 8 ms 0.22 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
passed 8 ms 1 ms 7 ms 0.27 ms Database 9
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_bot_and_locked
passed 8 ms 5 ms 0.59 ms 3 ms Libraries –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_404
passed 7 ms 0.94 ms 6 ms 0.21 ms Database 5
accounts/tests.py::TestMisskeyAdapter::test_missing_display_name_falls_back_to_username
passed 7 ms 6 ms 0.32 ms 0.30 ms Libraries –
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_network_error
passed 7 ms 0.92 ms 5 ms 0.61 ms Database 5
accounts/tests.py::TestParseDiscoverable::test_mastodon_top_level
passed 6 ms 1 ms 0.22 ms 5 ms pytest –
confs/tests.py::TestMigratedLegacyConferences::test_legacy_conferences_were_seeded
passed 6 ms 1 ms 5 ms 0.23 ms Database 6
accounts/tests.py::TestActivityPubActor::test_media_and_profile_url_variants
passed 6 ms 1 ms 4 ms 0.29 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_remote_user_acct_includes_host
passed 5 ms 4 ms 0.33 ms 0.33 ms pytest –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_status_code_on_429
passed 5 ms 2 ms 0.90 ms 2 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_required_fields_returns_none
passed 4 ms 1 ms 2 ms 0.24 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_maps_core_fields
passed 3 ms 2 ms 0.33 ms 0.27 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_missing_avatar_and_banner_are_empty_strings
passed 3 ms 2 ms 0.33 ms 0.27 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_daily_job_has_no_time_limit
passed 3 ms 2 ms 0.47 ms 0.23 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_hourly_job_keeps_the_default_time_limit
passed 2 ms 1 ms 0.32 ms 0.60 ms pytest –
accounts/tests.py::TestMisskeyApi::test_build_miauth_url
passed 2 ms 1 ms 0.33 ms 0.26 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_builds_code_flow_url_without_junk_params
passed 2 ms 1 ms 0.33 ms 0.25 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_none
passed 2 ms 1 ms 0.29 ms 0.31 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_mastodon_null_or_absent
passed 2 ms 1 ms 0.36 ms 0.22 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_aware_datetime_object_passes_through
passed 2 ms 1 ms 0.31 ms 0.21 ms pytest –
mastodon_auth/tests.py::AuthorizeUrlTests::test_force_login_included_only_when_requested
passed 2 ms 1 ms 0.35 ms 0.23 ms Unsampled –
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_maps_bridged_actor
passed 2 ms 1 ms 0.33 ms 0.26 ms Unsampled –
accounts/tests.py::TestMisskeyApi::test_is_misskey_family
passed 2 ms 1 ms 0.27 ms 0.30 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_falls_back_to_constructed_url_when_local
passed 2 ms 1 ms 0.30 ms 0.22 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_naive_datetime_object_is_made_aware
passed 2 ms 1 ms 0.33 ms 0.21 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_dict_converted_to_list
passed 2 ms 1 ms 0.38 ms 0.25 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_noindex_flips_discoverable
passed 2 ms 1 ms 0.30 ms 0.24 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_object_becomes_aware_midnight
passed 2 ms 1 ms 0.35 ms 0.22 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_is_pleroma
passed 2 ms 1 ms 0.28 ms 0.28 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_only_string_becomes_aware_midnight
passed 2 ms 1 ms 0.32 ms 0.21 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_top_level_false_wins_over_nested
passed 2 ms 1 ms 0.22 ms 0.28 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_iso_string_with_offset
passed 2 ms 1 ms 0.26 ms 0.23 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_pleroma_nested_in_source
passed 1 ms 0.96 ms 0.28 ms 0.25 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_emojis_missing_returns_empty_list
passed 1 ms 0.90 ms 0.27 ms 0.21 ms pytest –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 69 41.32 s 11.00 s
django_db_setup session 4 41.27 s 11.00 s
_unittest_setUpClass_fixture_TestSelectedInstance class 1 276 ms 276 ms
_unittest_setUpClass_fixture_TestConferencePage class 2 237 ms 178 ms
_unittest_setUpClass_fixture_TestShareStarterPack class 2 175 ms 89 ms
_unittest_setUpClass_fixture_TestOwnerManagement class 2 134 ms 78 ms
_unittest_setUpClass_fixture_TestWebfingerBackfill class 1 114 ms 114 ms
_unittest_setUpClass_fixture_TestPinAccountInStarterPack class 2 106 ms 58 ms
_unittest_setUpClass_fixture_TestFollowBg class 1 84 ms 84 ms
_unittest_setUpClass_fixture_TestEditStarterPackAccounts class 2 83 ms 44 ms
_django_isolate_apps function 301 65 ms 7 ms
_unittest_setUpClass_fixture_TestAddAccountsSearch class 1 62 ms 62 ms
_unittest_setUpClass_fixture_TestRemoteFollowStarterPack class 2 60 ms 35 ms
_unittest_setUpClass_fixture_TestDeleteStarterPack class 1 56 ms 56 ms
_unittest_setUpClass_fixture_TestEditStarterPack class 1 52 ms 52 ms