Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#8590 closed defect (fixed)

Signature of has_permission in MockPerm differs from PermissionCache

Reported by: Felix Schwarz <felix.schwarz@…> Owned by: Felix Schwarz <felix.schwarz@…>
Priority: normal Milestone: 0.11.6
Component: general Version: 0.11-stable
Severity: minor Keywords: testing
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I noticed MockPerm.has_permission has a different interface than PermissionCache.has_permission.

When the signature of MockPerm.has_permission is changed, please also change MockPerm's require and __call__ signatures so that they exactly accepts the same parameters as the PermissionCache (and not just any parameter) - otherwise some tests using MockPerm will succeed even though wrong parameters are used and the code will fail in production.

Attachments (1)

mockperm_signature (774 bytes ) - added by Felix Schwarz <felix.schwarz@…> 15 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Christian Boos, 15 years ago

Milestone: 0.12

Patch welcomed.

by Felix Schwarz <felix.schwarz@…>, 15 years ago

Attachment: mockperm_signature added

comment:2 by Christian Boos, 15 years ago

Keywords: testing added
Milestone: 0.120.11.6
Resolution: fixed
Status: newclosed

Patch applied in r8502.

It's good that you're using Mercurial patches (or was that generated with git?), but then you could as well prepare the commit message, which also has the advantage of making you less exposed to dubious jokes ;-)

comment:3 by Remy Blank, 15 years ago

Owner: set to Felix Schwarz <felix.schwarz@…>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Felix Schwarz <felix.schwarz@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Felix Schwarz <felix.schwarz@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.