コード例 #1
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)
コード例 #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)
コード例 #3
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)
コード例 #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)