Chore: Share the API client fixtures and build test users cheaply (#14199)

This commit is contained in:
Trenton H authored and GitHub committed 2026-09-21 10:57:14 -07:00
1 parent 2d955e9697
commit 99ce6b5db3
44 files changed
+442 -477

No files matched your search

+4 -1
View File
@@ -78,7 +78,10 @@ class UserFactory(DjangoModelFactory[UserModelT]):
username = factory.Sequence(lambda n: f"user{n}")
is_staff = False
is_superuser = False
password = factory.django.Password("test")
# Hashing a real password costs about half a second per user, and no test
# authenticates with its password. None gives the unusable password
# create_user() gives.
password = factory.django.Password(None)
class Params:
superuser = factory.Trait(is_staff=True, is_superuser=True)