Beispiel #1
0
 def evaluate(self):
     passed, cmp_result = comparison.compare(lhs=self.value,
                                             rhs=self.expected,
                                             ignore=self.exclude_keys,
                                             only=self.include_keys,
                                             report_all=self.report_all)
     self.comparison = flatten_dict_comparison(cmp_result)
     return passed
Beispiel #2
0
 def evaluate(self):
     """Evaluate the dict match."""
     passed, cmp_result = comparison.compare(
         lhs=self.value,
         rhs=self.expected,
         ignore=self.exclude_keys,
         only=self.include_keys,
         report_mode=self._report_mode,
         value_cmp_func=self._value_cmp_func)
     self.comparison = flatten_dict_comparison(cmp_result)
     return passed
Beispiel #3
0
    def evaluate(self):
        self.matches, self.result = comparison.dictmatch_all_compat(
            match_name=self.__class__.__name__,
            comparisons=self.comparisons,
            values=self.values,
            key_weightings=self.key_weightings,
            description=self.description,
        )

        for match in self.matches:
            match['comparison'] = flatten_dict_comparison(match['comparison'])

        return self.result.passed