Exemple #1
0
    def get_unique_counts_dict(self, object_class):
        """ get a the varible for storing unique counts

    Make sure to always return the same variable for object with shared tables,
    as defined in sharing rules.
    """
        sharing_rules = get_shared_unique_rules()
        classes = sharing_rules.get(object_class, object_class)
        shared_state = self.converter.shared_state
        if classes not in shared_state:
            shared_state[classes] = defaultdict(
                lambda: structures.CaseInsensitiveDefaultDict(list))
        return shared_state[classes]
 def setUp(self):
     self.ci_dict = structures.CaseInsensitiveDefaultDict(list)