You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smart-top/test/TestServerMonitor.py

19 lines
613 B
Python

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()