示例#1
0
 def test_nginx_started_systemd(self, is_active, is_systemd):
     res = nginx_started()
     self.assertTrue(is_active.called)
     self.assertEqual(res, True)
     is_active.return_value = "inactive"
     res = nginx_started()
     self.assertTrue(is_active.called)
     self.assertEqual(res, False)
示例#2
0
 def test_nginx_started_systemd(self, is_active, is_systemd):
     res = nginx_started()
     self.assertTrue(is_active.called)
     self.assertEqual(res, True)
     is_active.return_value = "inactive"
     res = nginx_started()
     self.assertTrue(is_active.called)
     self.assertEqual(res, False)
示例#3
0
 def test_nginx_started(self, is_running, is_systemd):
     res = nginx_started()
     self.assertTrue(is_running.called)
     self.assertEqual(res, True)
     is_running.return_value = False
     res = nginx_started()
     self.assertTrue(is_running.called)
     self.assertEqual(res, False)
示例#4
0
 def test_nginx_started(self, is_running, is_systemd):
     res = nginx_started()
     self.assertTrue(is_running.called)
     self.assertEqual(res, True)
     is_running.return_value = False
     res = nginx_started()
     self.assertTrue(is_running.called)
     self.assertEqual(res, False)