Changeset 1233 in main


Ignore:
Timestamp:
06/19/12 15:38:24 (7 years ago)
Author:
zali
Message:

Cancel Test : add a test for object link to document

File:
1 edited

Legend:

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

    r1232 r1233  
    879879    def test_cancel_child(self) : 
    880880        """ Test that a child (part) can *not* be cancelled. """ 
    881         self.add_child() 
     881        self.controller.add_child(self.controller3, 10, 15, "m") 
    882882        children = self.controller.get_children() 
    883883        self.assertEqual(len(children), 1) 
    884         self.assertCancelError(self.controller2) 
     884        self.assertCancelError(self.controller3) 
    885885     
    886886    def test_cancel_parent(self) : 
    887887        """ Tests that a parent (part) can *not* be cancelled. """ 
    888         self.add_child() 
    889         children = self.controller.get_children() 
     888        self.controller3.add_child(self.controller2, 10, 15, "m") 
     889        children = self.controller3.get_children() 
    890890        self.assertEqual(len(children), 1) 
     891        self.assertCancelError(self.controller3) 
     892         
     893    def test_cancel_has_document_related(self): 
     894        """ Tests that a part with a document related can *not* be cancelled. """ 
     895        self.assertEqual(len(self.controller.get_attached_documents()), 1) 
    891896        self.assertCancelError(self.controller) 
     897         
Note: See TracChangeset for help on using the changeset viewer.