flakytest.dev anze3db fedidevs
Profiles / #10

Passed Run of Nov 7, 23:52

CI github-actions:test · 9b8826a 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
24.60 s
4 workers
Test time
54.75 s
sum of test durations
Tests
310
310 passed
Profiler
tachyon
1000 Hz · 53,211 samples · Python 3.15.2 · flakytest 2026.0b1
Peak memory
652 MB
4 workers together

Where the time goes

Test time by category
  • Password hashing16.28 s
  • Migrations14.16 s
  • Libraries9.31 s
  • Database8.49 s
  • DB schema2.79 s
  • Imports1.01 s
  • Templates979 ms
  • Mocking855 ms
  • pytest264 ms
  • Unsampled250 ms
  • Factories188 ms
  • App code65 ms
  • Deep copies41 ms
  • Cache13 ms
  • Waiting12 ms
  • Test code12 ms
  • Network11 ms
  • Logging10 ms
  • Serialization5 ms
  • Fixture loading2 ms

Session timeline

Other
2 ms
Tests
54.94 s
Startup
4.98 s
Collection
1.53 s
Test phases
Setup 16.51 s Call 37.09 s Teardown 1.15 s

Fix next

Ranked by the time each fix saves per run
1

Use a fast password hasher in tests

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

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

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

Where:

  • confs/tests.py:1044 TestCreateConference.setUp · 2.91 s
  • confs/tests.py:1176 TestEditConference.setUp · 2.25 s
  • confs/tests.py:1177 TestEditConference.setUp · 2.23 s
  • confs/tests.py:1175 TestEditConference.setUp · 2.18 s
  • confs/tests.py:1371 TestApproveConference.setUp · 1.65 s
  • confs/tests.py:1372 TestApproveConference.setUp · 1.63 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.03 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.03 s
  • confs/tests.py:1296 TestUnapproveConference.setUp · 403 ms
  • confs/tests.py:1295 TestUnapproveConference.setUp · 401 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestApproveConference::test_staff_approves
  • confs/tests.py::TestEditConference::test_owner_can_view_edit_form
  • confs/tests.py::TestApproveConference::test_non_staff_forbidden

Documentation

2

Use plain static file storage in tests

Static file storage/manifest handling costs 13.7s.

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

Where:

  • starter_packs/views.py:862 share_starter_pack · 413 ms
  • accounts/views.py:425 index · 397 ms
  • starter_packs/tests.py:736 TestShareStarterPack.test_non_discoverable_accounts · 324 ms
  • confs/tests.py:875 TestConferencePage.test_conference_with_utc_with_date_no_posts · 276 ms
  • starter_packs/tests.py:125 TestCreateStarterPack.test_form_error · 264 ms
  • accounts/tests.py:536 TestStaticPages.test_developers_on_mastodon · 254 ms
  • starter_packs/tests.py:1068 TestPinAccountInStarterPack.test_pin_limit · 251 ms
  • confs/tests.py:1153 TestCreateConference.test_rejects_more_than_three_icons · 249 ms
  • starter_packs/tests.py:841 TestShareStarterPack.test_api_formats · 225 ms
  • confs/tests.py:193 TestMigratedLegacyConferences.test_djangoconus_date_redirects · 221 ms

Most affected tests:

  • starter_packs/tests.py::TestShareStarterPack::test_non_discoverable_accounts
  • confs/tests.py::TestConferencePage::test_conference_with_utc_with_date_no_posts
  • starter_packs/tests.py::TestCreateStarterPack::test_form_error
  • accounts/tests.py::TestStaticPages::test_developers_on_mastodon
  • starter_packs/tests.py::TestPinAccountInStarterPack::test_pin_limit
  • confs/tests.py::TestCreateConference::test_rejects_more_than_three_icons
  • starter_packs/tests.py::TestEditStarterPackAccounts::test_not_owned_starter_pack
  • confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_date_redirects
3

Stop re-running migrations on every test run

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

High Migrations
12.75 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. Read the guide
Details

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

Where:

  • confs/tests.py:432 TestLegacyConferenceDataMigration._migrate · 640 ms
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 355 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:388 _get_or_create_conference · 103 ms
  • confs/tests.py:412 TestLegacyConferenceDataMigration._leaf_targets · 78 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:214 _pk_batches · 48 ms
  • confs/tests.py:430 TestLegacyConferenceDataMigration._migrate · 43 ms
  • confs/tests.py:431 TestLegacyConferenceDataMigration._migrate · 33 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:398 migrate_legacy_pair · 29 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:325 _refresh_account_counts · 27 ms
  • confs/migrations/0033_remove_legacy_conference_tables.py:368 _attach_lookups_and_tags · 21 ms

Most affected tests:

  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • 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 15.9s in total (password hashing 15.7s, db 159ms, factories 6ms) in 7 classes: TestApproveConference (6 tests), TestFollowStarterPack (3 tests), TestPostAnnouncements (6 tests), TestCreateConference (10 tests).

High Database
11.12 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). Read the guide
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 TestCreateConference.setUp · 2.92 s
  • confs/tests.py:1176 TestEditConference.setUp · 2.26 s
  • confs/tests.py:1177 TestEditConference.setUp · 2.25 s
  • confs/tests.py:1175 TestEditConference.setUp · 2.19 s
  • confs/tests.py:1371 TestApproveConference.setUp · 1.66 s
  • confs/tests.py:1372 TestApproveConference.setUp · 1.64 s
  • confs/tests.py:1316 TestConferenceApprovalVisibility.setUp · 1.03 s
  • confs/tests.py:1317 TestConferenceApprovalVisibility.setUp · 1.03 s
  • confs/tests.py:1296 TestUnapproveConference.setUp · 405 ms
  • confs/tests.py:1295 TestUnapproveConference.setUp · 404 ms

Most affected tests:

  • confs/tests.py::TestEditConference::test_edit_does_not_change_slug
  • confs/tests.py::TestEditConference::test_other_user_forbidden_on_approved_conference
  • confs/tests.py::TestEditConference::test_other_user_forbidden
  • confs/tests.py::TestEditConference::test_owner_can_edit
  • confs/tests.py::TestEditConference::test_owner_can_edit_after_approval
  • confs/tests.py::TestApproveConference::test_staff_approves
  • 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_fwd50_date_redirects. N+1 queries slow the tests and production alike.

High Database
6.70 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). Read the guide
Details

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

  • 45x in test_fwd50_date_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
  • 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_two_facets_are_noindex: 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_is_idempotent_and_refreshes_unposted_content: 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:

  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • 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

Disable django-debug-toolbar in tests

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

High App code
5.62 s per run
Fix: Only add debug_toolbar to INSTALLED_APPS and MIDDLEWARE when not testing (e.g. `if DEBUG and not TESTING:`). Read the guide
Details

Where:

  • starter_packs/views.py:862 share_starter_pack · 413 ms
  • accounts/views.py:425 index · 397 ms
  • accounts/tests.py:536 TestStaticPages.test_developers_on_mastodon · 240 ms
  • accounts/views.py:28 CountlessPage.__init__ · 218 ms
  • starter_packs/views.py:185 starter_packs · 209 ms
  • starter_packs/views.py:60 get_editable_pack · 164 ms
  • accounts/views.py:295 index · 142 ms
  • accounts/templatetags/account_extras.py:36 instances_datalist · 121 ms
  • confs/views.py:509 create_conference · 114 ms
  • starter_packs/splash_images.py:77 get_splash_image_accounts · 113 ms

Most affected tests:

  • accounts/tests.py::TestStaticPages::test_developers_on_mastodon
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestCreateConference::test_form_renders_for_authenticated_user
  • confs/tests.py::TestCreateConference::test_advanced_days_are_saved
  • accounts/tests.py::TestAccountIndexRobots::test_single_facet_is_indexable
  • fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_anonymous_forms_work_after_csrf_bootstrap
  • starter_packs/tests.py::TestStarterPacks::test_index_page

Documentation

7

Make the test database server skip durability work

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

Medium Database
5.09 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. Read the guide
Details

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

Where:

  • confs/tests.py:432 TestLegacyConferenceDataMigration._migrate · 640 ms
  • starter_packs/tests.py:397 TestToggleStarterPackAccount.test_toggle_after_limit · 448 ms
  • confs/migrations/0031_seed_conference_tags.py:14 seed_conference_tags · 355 ms
  • starter_packs/views.py:862 share_starter_pack · 274 ms
  • accounts/views.py:28 CountlessPage.__init__ · 218 ms
  • starter_packs/views.py:60 get_editable_pack · 164 ms
  • stats/models.py:20 store_daily_stats · 144 ms
  • accounts/views.py:295 index · 142 ms
  • stats/models.py:12 store_daily_stats · 136 ms
  • accounts/templatetags/account_extras.py:36 instances_datalist · 121 ms

Most affected tests:

  • accounts/tests.py::TestSelectedInstance::test_invalid_selected_instance
  • confs/tests.py::TestSyncAnnouncements::test_is_idempotent_and_refreshes_unposted_content
  • accounts/tests.py::TestAccountIndexRobots::test_two_facets_are_noindex
  • confs/tests.py::TestMigratedLegacyConferences::test_fwd50_date_redirects
  • 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
  • mastodon_auth/tests.py::MastodonRatelimitHeaderTests::test_creates_session_with_hook_when_none_given

Documentation

8

pytest-xdist workers finish at very different times

The busiest worker ran 19.0s of tests, the least busy 11.6s.

Medium Parallelism
3.71 s per run
Fix: Use --dist worksteal (pytest-xdist 3.2+) so idle workers take tests from busy ones; if you use --dist loadscope/loadfile, split the biggest classes or modules. Read the guide
Details

Documentation

9

pytest takes a long time before the first test runs

Startup takes 5.0s and collection 1.5s on every run, even when you only run one test.

Medium Imports
2.60 s per run
Fix: Set testpaths and norecursedirs (node_modules, .venv, build, docs) so pytest doesn't walk unrelated directories; move heavy imports out of module level in test files and conftest.py into fixtures; check `python -X importtime -m pytest --collect-only -q` for the slowest imports. Read the guide
Details
  • mastodon_auth/tests.py (603ms)
  • starter_packs/tests.py (221ms)
  • accounts/tests.py (52ms)
  • confs/tests.py (10ms)
  • posts/tests.py (2ms)
  • fedidevs/settings.py (970ms)
  • debug_toolbar/panels/sql/__init__.py (793ms)
  • starter_packs/admin.py (677ms)

Documentation

10

Run migrations once, not once per worker

Each of the 4 pytest-xdist workers builds its own test database by running every migration: 15.1s in total, about 3.8s per worker. 11.3s of it repeats work another worker already did.

Medium Migrations
11.30 s per run
Fix: Migrate once and copy the database: let one worker build the test database and have the others create theirs from it as a template (on PostgreSQL, CREATE DATABASE ... TEMPLATE ..., which copies files instead of running migrations). Django's own test runner already does this with --parallel. Read the guide
Details

Every copy is built by the same migrations, so a broken migration still fails the run.

  • {'total': 15.062, 'builds': 4, 'workers': 4, 'per_build': 3.765}

Documentation

Tests

201–310 of 310, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
starter_packs/tests.py::TestShareStarterPack::test_api_formats_4___application_json____application_json__
passed 54 ms 0.80 ms 52 ms 0.25 ms Libraries 8
accounts/tests.py::TestAccountIndexRobots::test_deep_pagination_is_noindex
passed 53 ms 0.69 ms 52 ms 0.22 ms Libraries 8
confs/tests.py::TestSyncAnnouncements::test_creates_and_links_start_and_end_announcements
passed 53 ms 12 ms 37 ms 5 ms Database 13
fedidevs/tests.py::TestPotatoqDashboard::test_staff_sees_dashboard
passed 53 ms 0.65 ms 52 ms 0.40 ms Libraries 22
posts/tests.py::TestSubscribePages::test_subscribe_success_uses_tailwind_layout
passed 53 ms 9 ms 44 ms 0.22 ms Libraries 6
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_pleroma_null_account_fields_are_coerced
passed 53 ms 0.57 ms 52 ms 0.24 ms Mocking 33
announcements/tests.py::TestPostAnnouncements::test_does_not_repost_already_posted
passed 53 ms 19 ms 33 ms 0.56 ms Database 10
starter_packs/tests.py::TestDeleteStarterPack::test_not_owned_starter_pack
passed 53 ms 0.75 ms 50 ms 2 ms Database 24
fedidevs/tests.py::TestPotatoqDashboard::test_superuser_without_staff_flag_sees_dashboard
passed 52 ms 0.80 ms 47 ms 4 ms Database 22
mastodon_auth/tests.py::RedirectToLocalViewTests::test_valid_query_redirects_unauthenticated_users_to_target
passed 52 ms 1 ms 49 ms 2 ms Libraries 5
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_unknown_state_is_logged_as_warning_not_error
passed 52 ms 0.76 ms 47 ms 5 ms Libraries 5
starter_packs/tests.py::TestShareStarterPack::test_api_formats_7___text_plain____text_html__
passed 52 ms 0.57 ms 51 ms 0.24 ms Database 12
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_token_exchange_failure_without_token_errors
passed 51 ms 0.64 ms 50 ms 0.28 ms Mocking 8
accounts/tests.py::TestAccountIndexRobots::test_empty_facet_values_are_not_facets
passed 50 ms 0.57 ms 49 ms 0.23 ms Database 8
posts/tests.py::TestSubscribePages::test_subscribe_uses_tailwind_layout
passed 50 ms 0.61 ms 45 ms 4 ms Libraries 6
starter_packs/tests.py::TestShareStarterPack::test_api_formats_1___application_ld_json__profile__https___www_w3_org_ns_activitystreams_____application_activity_json__
passed 49 ms 1 ms 48 ms 0.23 ms Libraries 10
starter_packs/tests.py::TestDeleteStarterPack::test_not_logged_in
passed 49 ms 0.64 ms 48 ms 0.38 ms Libraries 7
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_pleroma_granular_scope_mismatch_still_logs_in
passed 48 ms 0.57 ms 48 ms 0.25 ms Mocking 32
confs/tests.py::TestConferencePage::test_conference_with_pacific_with_date_no_posts
passed 48 ms 0.64 ms 47 ms 0.23 ms Libraries 12
starter_packs/tests.py::TestShareStarterPack::test_api_formats_3___application_activity_json_q_0_5_text_html_q_0_4____application_activity_json__
passed 48 ms 0.60 ms 47 ms 0.23 ms Libraries 10
starter_packs/tests.py::TestShareStarterPack::test_api_plain_json
passed 47 ms 0.55 ms 47 ms 0.23 ms Libraries 9
starter_packs/tests.py::TestPinAccountInStarterPack::test_toggle_pin_requires_ownership
passed 47 ms 0.58 ms 46 ms 0.23 ms Libraries 25
fedidevs/tests.py::TestAccountIndexQueryParams::test_language_index_strips_unknown_params
passed 46 ms 1 ms 45 ms 0.22 ms Libraries –
fedidevs/tests.py::TestPotatoqDashboard::test_anonymous_is_sent_to_login
passed 45 ms 0.58 ms 44 ms 0.23 ms Libraries 5
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_invalid_grant_is_logged_as_warning_not_error
passed 44 ms 0.66 ms 43 ms 0.18 ms Mocking 8
starter_packs/tests.py::TestRemoteFollowStarterPack::test_get_not_allowed
passed 40 ms 0.63 ms 38 ms 0.99 ms Libraries 5
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_other_illegal_argument_error_still_logged_at_error
passed 39 ms 0.57 ms 39 ms 0.19 ms Mocking 7
starter_packs/tests.py::TestShareStarterPack::test_not_existing_starter_pack
passed 39 ms 0.62 ms 38 ms 0.21 ms Libraries 6
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_keyerror_without_token_errors
passed 38 ms 0.55 ms 37 ms 0.19 ms Mocking 8
stats/tests.py::TestStarterPackStats::test_starter_pack_stats
passed 38 ms 9 ms 28 ms 1 ms Database 25
15 repeated
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_missing_code_state_is_logged_at_error
passed 38 ms 0.55 ms 37 ms 0.17 ms Libraries 5
fedidevs/tests.py::TestAnonymousCacheAndCsrf::test_csrf_endpoint_sets_cookie_and_returns_token
passed 37 ms 0.63 ms 36 ms 0.23 ms Libraries 5
confs/tests.py::TestMigratedLegacyConferences::test_djangoconafrica_date_redirects
passed 35 ms 0.57 ms 35 ms 0.23 ms Libraries 5
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_error_redirect_is_surfaced
passed 35 ms 0.59 ms 34 ms 0.17 ms Libraries 5
confs/tests.py::TestMigratedLegacyConferences::test_djangoconus_old_url_redirects
passed 34 ms 0.57 ms 33 ms 0.23 ms Unsampled 5
fedidevs/tests.py::TestAccountIndexQueryParams::test_unknown_root_param_is_301ed
passed 34 ms 0.58 ms 33 ms 0.39 ms Libraries –
mastodon_auth/tests.py::MastodonAuthCallbackTests::test_oauth_access_denied_is_logged_as_warning_not_error
passed 34 ms 0.57 ms 33 ms 0.18 ms Libraries 5
confs/tests.py::TestSyncAnnouncements::test_variation_is_stable_across_resyncs
passed 33 ms 0.58 ms 31 ms 2 ms Database 17
4 repeated
mastodon_auth/tests.py::MastodonVersionCheckTests::test_log_in_survives_instance_endpoint_rejecting_requests
passed 26 ms 0.59 ms 25 ms 0.27 ms Libraries –
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match
passed 24 ms 10 ms 13 ms 0.21 ms Database 12
accounts/tests.py::TestCrawlerGotosocial::test_auth_gated_directory_caches_unknown_and_skips_misskey_probe
passed 21 ms 0.55 ms 20 ms 0.23 ms Unsampled –
confs/tests.py::TestSyncAnnouncements::test_uses_one_of_the_message_variations
passed 19 ms 4 ms 15 ms 0.23 ms Database 13
confs/tests.py::TestSyncAnnouncements::test_leaves_already_posted_announcements_untouched
passed 19 ms 0.74 ms 18 ms 0.24 ms Database 17
3 repeated
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_resolve_posts_does_not_scan_or_join_accounts_by_url
passed 18 ms 3 ms 12 ms 3 ms Database 9
starter_packs/tests.py::TestGetSubscribeUrl::test_no_subscribe_link
passed 18 ms 12 ms 5 ms 0.18 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_post_at_uses_conference_timezone
passed 17 ms 0.94 ms 16 ms 0.23 ms Database 12
announcements/tests.py::TestPostAnnouncements::test_records_error_and_leaves_row_unposted
passed 17 ms 0.56 ms 17 ms 0.20 ms Database 10
confs/tests.py::TestPostsAfterDatetime::test_aware_start_of_day_in_conference_timezone
passed 16 ms 9 ms 6 ms 0.21 ms Database 6
confs/tests.py::TestSyncAnnouncements::test_skips_pending_conferences
passed 15 ms 3 ms 12 ms 0.23 ms Database 8
starter_packs/tests.py::TestParseHandle::test_invalid_handles
passed 15 ms 12 ms 2 ms 0.16 ms Database 5
confs/tests.py::TestMigratedLegacyConferences::test_account_kwargs_from_json
passed 13 ms 11 ms 2 ms 0.18 ms Database 5
confs/tests.py::TestSyncAnnouncements::test_skips_past_and_archived_conferences
passed 13 ms 0.59 ms 12 ms 0.21 ms Database 9
stats/tests.py::TestStats::test_all_daily_lang_stats
passed 13 ms 10 ms 3 ms 0.80 ms Database 5
announcements/tests.py::TestPostAnnouncements::test_respects_visibility
passed 12 ms 0.56 ms 11 ms 0.17 ms Database 10
starter_packs/tests.py::TestFollowBg::test_stops_after_unauthorized
passed 11 ms 0.64 ms 10 ms 0.74 ms Database 10
confs/tests.py::TestConferenceOgImage::test_signature_changes_with_visible_content
passed 11 ms 2 ms 6 ms 2 ms Database 6
announcements/tests.py::TestPostAnnouncements::test_posts_only_due_announcements
passed 11 ms 0.70 ms 10 ms 0.19 ms Database 11
3 repeated
announcements/tests.py::TestPostAnnouncements::test_skips_when_token_missing
passed 11 ms 0.60 ms 5 ms 5 ms Database 8
announcements/tests.py::TestPostAnnouncements::test_dry_run_is_the_default
passed 11 ms 0.66 ms 10 ms 0.21 ms Database 9
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_post_by_post_id_and_account
passed 10 ms 0.59 ms 9 ms 0.20 ms Database 10
mastodon_auth/tests.py::MastodonLoginFormTests::test_rejects_invalid_idna_hostname
passed 9 ms 0.74 ms 5 ms 4 ms Database 5
confs/tests.py::TestMigratedLegacyConferences::test_legacy_tables_were_dropped
passed 9 ms 0.62 ms 9 ms 0.24 ms Database 6
confs/tests.py::TestPostsAfterDatetime::test_none_when_unset
passed 8 ms 0.60 ms 6 ms 1 ms Database 6
starter_packs/tests.py::TestParseHandle::test_valid_handles
passed 7 ms 0.59 ms 5 ms 2 ms Imports 5
confs/tests.py::TestMigratedLegacyConferences::test_legacy_conferences_were_seeded
passed 7 ms 0.68 ms 6 ms 0.20 ms Database 6
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_dedupes_same_url_and_same_pair_in_one_batch
passed 6 ms 0.65 ms 6 ms 0.15 ms Unsampled 11
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs
passed 5 ms 0.56 ms 4 ms 0.14 ms Database 9
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_invalid_json
passed 5 ms 0.67 ms 4 ms 0.14 ms Database 5
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_non_https_template
passed 4 ms 0.59 ms 4 ms 0.14 ms Database 5
confs/tests.py::TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_url_when_ids_differ
passed 4 ms 0.53 ms 4 ms 0.15 ms Database 8
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_network_error
passed 4 ms 0.52 ms 3 ms 0.83 ms Database 5
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_on_non_gotosocial_leaves_uri_missing
passed 4 ms 0.86 ms 3 ms 0.17 ms Waiting –
accounts/tests.py::TestCrawlerGotosocial::test_open_directory_resolves_missing_actor_uri_via_webfinger
passed 3 ms 0.81 ms 2 ms 0.60 ms Waiting –
starter_packs/tests.py::TestGetSubscribeUrl::test_returns_filled_template
passed 3 ms 0.59 ms 2 ms 0.45 ms Unsampled 5
starter_packs/tests.py::TestGetSubscribeUrl::test_rejects_template_without_uri_placeholder
passed 3 ms 0.86 ms 2 ms 0.14 ms Libraries 5
starter_packs/tests.py::TestGetSubscribeUrl::test_webfinger_404
passed 2 ms 0.56 ms 2 ms 0.13 ms Database 5
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_rejects_malformed_or_incomplete_urls
passed 2 ms 0.87 ms 1 ms 0.16 ms Unsampled –
mastodon_auth/tests.py::IsValidRedirectQueryTests::test_accepts_http_and_https_urls_with_host
passed 2 ms 1 ms 0.87 ms 0.17 ms Unsampled –
accounts/tests.py::TestMisskeyApi::test_is_misskey_family
passed 2 ms 0.47 ms 1 ms 0.28 ms pytest –
accounts/tests.py::TestActivityPubActor::test_actor_to_account_defaults_maps_bridged_actor
passed 2 ms 0.93 ms 0.57 ms 0.13 ms Libraries –
mastodon_auth/tests.py::RegisterAppTests::test_raises_when_credentials_missing_from_body
passed 2 ms 0.57 ms 0.84 ms 0.19 ms Mocking –
accounts/tests.py::TestParseDiscoverable::test_mastodon_top_level
passed 2 ms 0.69 ms 0.25 ms 0.56 ms Libraries –
accounts/tests.py::TestJobTimeLimits::test_daily_job_has_no_time_limit
passed 1 ms 0.97 ms 0.38 ms 0.14 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_status_code_on_429
passed 1 ms 0.55 ms 0.67 ms 0.16 ms Unsampled –
accounts/tests.py::TestMisskeyApi::test_build_miauth_url
passed 1 ms 1 ms 0.19 ms 0.11 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_mastodon_null_or_absent
passed 1 ms 0.85 ms 0.23 ms 0.18 ms Unsampled –
mastodon_auth/tests.py::RegisterAppTests::test_raises_with_none_status_on_network_error
passed 1 ms 0.56 ms 0.56 ms 0.12 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_dict_converted_to_list
passed 1 ms 0.72 ms 0.23 ms 0.18 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_maps_core_fields
passed 1 ms 0.60 ms 0.16 ms 0.38 ms Libraries –
mastodon_auth/tests.py::RegisterAppTests::test_returns_credentials_on_200
passed 1 ms 0.46 ms 0.51 ms 0.14 ms Unsampled –
accounts/tests.py::TestJobTimeLimits::test_hourly_job_keeps_the_default_time_limit
passed 1 ms 0.62 ms 0.33 ms 0.14 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_falls_back_to_constructed_url_when_local
passed 1 ms 0.67 ms 0.19 ms 0.17 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_emojis_missing_returns_empty_list
passed 1 ms 0.58 ms 0.16 ms 0.28 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_top_level_false_wins_over_nested
passed 1 ms 0.69 ms 0.15 ms 0.16 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_required_fields_returns_none
passed 0.99 ms 0.52 ms 0.20 ms 0.27 ms Unsampled –
accounts/tests.py::TestParseDiscoverable::test_pleroma_nested_in_source
passed 0.98 ms 0.73 ms 0.14 ms 0.11 ms pytest –
accounts/tests.py::TestActivityPubActor::test_media_and_profile_url_variants
passed 0.97 ms 0.60 ms 0.16 ms 0.21 ms pytest –
accounts/tests.py::TestMisskeyAdapter::test_missing_display_name_falls_back_to_username
passed 0.93 ms 0.63 ms 0.17 ms 0.13 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_builds_code_flow_url_without_junk_params
passed 0.90 ms 0.58 ms 0.20 ms 0.12 ms pytest –
mastodon_auth/tests.py::ParseDtTests::test_aware_datetime_object_passes_through
passed 0.89 ms 0.63 ms 0.15 ms 0.12 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_force_login_included_only_when_requested
passed 0.82 ms 0.52 ms 0.17 ms 0.13 ms Unsampled –
mastodon_auth/tests.py::AuthorizeUrlTests::test_is_pleroma
passed 0.75 ms 0.46 ms 0.15 ms 0.14 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_object_becomes_aware_midnight
passed 0.74 ms 0.46 ms 0.17 ms 0.11 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_none
passed 0.74 ms 0.44 ms 0.14 ms 0.16 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_missing_avatar_and_banner_are_empty_strings
passed 0.73 ms 0.43 ms 0.19 ms 0.11 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_naive_datetime_object_is_made_aware
passed 0.73 ms 0.45 ms 0.17 ms 0.11 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_noindex_flips_discoverable
passed 0.73 ms 0.49 ms 0.13 ms 0.11 ms Unsampled –
accounts/tests.py::TestMisskeyAdapter::test_remote_user_acct_includes_host
passed 0.73 ms 0.42 ms 0.15 ms 0.15 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_iso_string_with_offset
passed 0.72 ms 0.48 ms 0.13 ms 0.11 ms Unsampled –
mastodon_auth/tests.py::ParseDtTests::test_date_only_string_becomes_aware_midnight
passed 0.72 ms 0.45 ms 0.16 ms 0.11 ms pytest –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 78 15.08 s 3.91 s
django_db_setup session 4 15.06 s 3.91 s
_unittest_setUpClass_fixture_TestShareStarterPack class 3 146 ms 58 ms
_unittest_setUpClass_fixture_TestSelectedInstance class 1 91 ms 91 ms
_unittest_setUpClass_fixture_TestFollowStarterPack class 2 82 ms 46 ms
_unittest_setUpClass_fixture_TestPinAccountInStarterPack class 2 69 ms 40 ms
_unittest_setUpClass_fixture_TestOwnerManagement class 2 65 ms 35 ms
_unittest_setUpClass_fixture_TestWebfingerBackfill class 1 60 ms 60 ms
_unittest_setUpClass_fixture_TestEditStarterPackAccounts class 2 49 ms 26 ms
_unittest_setUpClass_fixture_TestFollowBg class 1 44 ms 44 ms
_unittest_setUpClass_fixture_TestCreateStarterPack class 2 43 ms 23 ms
_unittest_setUpClass_fixture_TestAddAccountsSearch class 1 40 ms 40 ms
_unittest_setUpClass_fixture_TestStarterPacks class 1 34 ms 34 ms
_unittest_setUpClass_fixture_TestConferencePage class 1 31 ms 31 ms
_unittest_setUpClass_fixture_TestRemoteFollowStarterPack class 2 29 ms 15 ms