Opened 9 years ago
Closed 9 years ago
#26175 closed Cleanup/optimization (fixed)
Use create_user() managers in tests instead of hardcoding sha1 hashes
Reported by: | Tim Graham | Owned by: | Tim Graham |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
In 39a7eed1bbf12020a077e4bec3d82e08f171a021, some test fixtures were converted to use the ORM. This was a good step, but we still have hardcoded sha1 hashes which aren't friendly to reverse if you actually need the user's password.
Also, the fixtures were converted programmatically and some fields from the fixtures aren't need in the ORM versions (such as is_active=True
since that's the default).
Most usage of self.client.login(**credentials)
should be converted to self.client.force_login(user)
.
I attached a patch to get you started.
Please check the selenium tests too.
Attachments (1)
Change History (3)
by , 9 years ago
Attachment: | 26175.diff added |
---|
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
In 015fad9: