12345678910111213141516171819 |
- from __future__ import division
- import unittest
- from monitor import Env, DetailProcess
- class TestMonitorServer(unittest.TestCase):
-
- def test_Environment(self):
- """
- This test case is designed to test the existance of a resource set as an environment variable. This applies to files, folders (not values)
- """
- p = Env(['PATH','HOME','SHELL'])
- value = p.composite()
- self.assertTrue(value > 0 and value == 2/3)
- self.assertTrue(p.evaluate('PATH') == 0)
- def test_RunningProcess(self):
- p = DetailProcess(['rabbitmq-server','python'])
- print p.composite()
- if __name__ == '__main__' :
- unittest.main()
|