Changeset 1211 in main


Ignore:
Timestamp:
06/12/12 09:41:05 (7 years ago)
Author:
zali
Message:

PMLObject controller: add one missing test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/tests/controllers/plmobject.py

    r1210 r1211  
    657657    def test_cancel_not_owner(self): 
    658658        """ Tests that only a user who does not have owner rights on the object 
    659         can not cancel.""" 
     659        can not cancel it.""" 
    660660        controller = self.get_created_ctrl() 
    661661        user = self.get_contributor() 
     
    663663        self.assertCancelError(ctrl) 
    664664         
     665    def test_cancel_owner(self): 
     666        """ Tests that any user with owner rights on the object 
     667        can cancel it.""" 
     668        controller = self.get_created_ctrl() 
     669        user = self.get_contributor() 
     670        controller.set_owner(user) 
     671        ctrl = self.CONTROLLER(controller.object, user) 
     672        self.assertCancel(ctrl) 
     673         
    665674    def test_cancel_revised(self): 
    666675        """Tests that an object (here a draft) with more than one revision can *not* be cancelled""" 
Note: See TracChangeset for help on using the changeset viewer.