def test_get_ancestors_cached_no_filediffs(self):
        """Testing FileDiff.get_ancestors with cached results when no
        FileDiffs are provided
        """
        ancestors = {}

        for filediff in self.filediffs:
            filediff.get_ancestors(minimal=True,
                                   filediffs=self.filediffs)

        with self.assertNumQueries(5):
            for filediff in self.filediffs:
                ancestors[filediff] = filediff.get_ancestors(minimal=True)

        self._check_ancestors(ancestors, minimal=True)