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