Browse Source

[1175] send the command 'status' to the stats when it started, and
then send the command 'shutdown', and also check each value returned
by each invoked command

Naoki Kambe 13 years ago
parent
commit
bd8cb42b61
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/bin/stats/tests/b10-stats-httpd_test.py

+ 4 - 1
src/bin/stats/tests/b10-stats-httpd_test.py

@@ -203,9 +203,12 @@ class TestHttpHandler(unittest.TestCase):
 
 
     def test_do_GET_failed1(self):
+        # checks status
+        self.assertEqual(send_command("status", "Stats"),
+                         (0, "Stats is up. (PID " + str(os.getpid()) + ")"))
         # failure case(Stats is down)
         self.assertTrue(self.stats.running)
-        send_shutdown("Stats") # Stats is down
+        self.assertEqual(send_shutdown("Stats"), (0, None)) # Stats is down
         self.assertFalse(self.stats.running)
         self.stats_httpd.cc_session.set_timeout(milliseconds=100)