Monday, 16 April 2012

Test Cases in OpenERP


-
  Check that Resource is in "draft" state.
-
  !assert {model: lib.register, id: register_001,string: Resource should be Available.}:
    - state == 'draft'
-
  I want to issue one book.
-
  !python {model: lib.register}: |
    self.registration_confirm(cr, uid, [ref("register_001")])
-
  I Check that Resource is "Issued"
-
  !assert {model: lib.register, id: register_001, string: Resource should be issued}:
    - state == 'issue'
-
  Return time, I close this Resource.
-
  !python {model: lib.register}: |
    self.button_reg_close(cr, uid, [ref("register_001")])
-
  Check that resource is in "close" state.
-
  !assert {model: lib.register, id: register_001, string: Resource should be Closed}:
    - state == 'close'

No comments:

Post a Comment