def test_check_snappy_optional_stop_without_start(self):
     '''Test check_snappy_optional() - with stop, no start'''
     self.set_test_systemd(self.default_appname,
                           key="stop",
                           value="/bin/bar")
     c = ClickReviewSystemd(self.test_name)
     c.check_snappy_optional()
     r = c.click_report
     expected_counts = {'info': 9, 'warn': 0, 'error': 0}
     self.check_results(r, expected_counts)
 def test_check_snappy_optional_none(self):
     '''Test check_snappy_optional() - start only'''
     self.set_test_systemd(self.default_appname,
                           key="start",
                           value="/bin/foo")
     c = ClickReviewSystemd(self.test_name)
     c.check_snappy_optional()
     r = c.click_report
     expected_counts = {'info': 9, 'warn': 0, 'error': 0}
     self.check_results(r, expected_counts)
 def test_check_snappy_optional_stop_bad(self):
     '''Test check_snappy_optional() - with bad stop'''
     self.set_test_systemd(self.default_appname,
                           key="start",
                           value="/bin/foo")
     self.set_test_systemd(self.default_appname, key="stop", value=[])
     c = ClickReviewSystemd(self.test_name)
     c.check_snappy_optional()
     r = c.click_report
     expected_counts = {'info': None, 'warn': 0, 'error': 1}
     self.check_results(r, expected_counts)