def show_in_current_context(self):
        excluded_site_paths = self.settings.exclude_sites or []
        if not excluded_site_paths:
            return True

        included_site_paths = set(self._all_sites_paths()) - set(excluded_site_paths)
        return is_path_included('/'.join(self.context.getPhysicalPath()),
                                included_site_paths,
                                excluded_site_paths)
Пример #2
0
    def show_in_current_context(self):
        excluded_site_paths = self.settings.exclude_sites or []
        if not excluded_site_paths:
            return True

        included_site_paths = set(self._all_sites_paths()) \
                              - set(excluded_site_paths)
        return is_path_included('/'.join(self.context.getPhysicalPath()),
                                included_site_paths,
                                excluded_site_paths)
 def assert_inclusion(self, expectation, included, excluded):
     got = dict((path, is_path_included(path, included, excluded))
                for path in expectation.keys())
     self.assertEquals(expectation, got)
Пример #4
0
 def assert_inclusion(self, expectation, included, excluded):
     got = dict((path, is_path_included(path, included, excluded))
                for path in expectation.keys())
     self.assertEquals(expectation, got)