Code

Opened 4 years ago

Closed 4 years ago

#12124 closed (invalid)

auth unit test bug: u.has_usable_password()

Reported by: dj_tw Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

in auth module's tests dir, in the file basic.py, on line 15:
the password was set to unusable on line 10 and saved.
the response to line 14 should be True instead of False:

8 >>> u.check_password('testpw')
9 True
10 >>> u.set_unusable_password()
11 >>> u.save()
12 >>> u.check_password('testpw')
13 False
14 >>> u.has_usable_password()
15 False

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by dj_tw

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Try formatting the quoted code section:

8 >>> u.check_password('testpw') 
9 True 
10 >>> u.set_unusable_password() 
11 >>> u.save() 
12 >>> u.check_password('testpw') 
13 False 
14 >>> u.has_usable_password() 
15 False 

comment:2 Changed 4 years ago by dj_tw

  • Resolution set to invalid
  • Status changed from new to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.