You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
927 B

  1. -
  2. I record a process log
  3. -
  4. !python {model: server.monitor.process}: |
  5. id = self.log_measure(cr, uid, None, None, 'test', context=context)
  6. -
  7. there should be some class instance counts in database
  8. -
  9. !python {model: server.monitor.class.instance.count}: |
  10. ids = self.search(cr, uid, [], context=context)
  11. assert ids, 'No class instance count recorded'
  12. -
  13. I cleanup the process logs
  14. -
  15. !python {model: server.monitor.process}: |
  16. id = self.cleanup(cr, uid, -1, context=context)
  17. -
  18. there should be no class instance count in database
  19. -
  20. !python {model: server.monitor.class.instance.count}: |
  21. ids = self.search(cr, uid, [], context=context)
  22. assert not ids, 'Class instance count still present'
  23. -
  24. there should be no monitor process in database
  25. -
  26. !python {model: server.monitor.process}: |
  27. ids = self.search(cr, uid, [], context=context)
  28. assert not ids, 'server monitor process still present'