def test_check_scope_ini(self): '''Test check_scope_ini()''' scope = self._create_scope(self._stub_config()) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': 4, 'warn': 0, 'error': 0} self.check_results(r, expected_counts)
def test_check_scope_ini_snappy_1504(self): '''Test check_scope_ini() - snappy 15.04''' self.set_test_pkgfmt("snap", "15.04") scope = self._create_scope(self._stub_config()) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': 4, 'warn': 0, 'error': 0} self.check_results(r, expected_counts)
def test_check_scope_ini_missing_required3(self): '''Test check_scope_ini() - missing Author''' config = self._stub_config() del config['Author'] scope = self._create_scope(config) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': None, 'warn': 0, 'error': 1} self.check_results(r, expected_counts)
def test_check_scope_ini_forbidden_field(self): '''Test check_scope_ini() - forbidden field''' config = self._stub_config() config['debugmode'] = "true" scope = self._create_scope(config) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': None, 'warn': 0, 'error': 1} self.check_results(r, expected_counts)
def test_check_scope_ini_nonexistent_field(self): '''Test check_scope_ini() - non-existent field''' config = self._stub_config() config['nonexistent'] = "foo" scope = self._create_scope(config) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': None, 'warn': 1, 'error': 0} self.check_results(r, expected_counts)
def test_check_scope_ini_bad_translated_field2(self): '''Test check_scope_ini() - translated field - de_DE''' config = self._stub_config() config['searchhint[de_DE]'] = "foo" scope = self._create_scope(config) self.set_test_scope(self.default_appname, scope) c = ClickReviewScope(self.test_name) c.check_scope_ini() r = c.click_report expected_counts = {'info': None, 'warn': 0, 'error': 0} self.check_results(r, expected_counts)