def test_has_errors_with_marker_cached(self): """Ensure returns the value from the marker when cached.""" context_id = 1 marker = FuriousCompletionMarker(id=context_id, has_errors=True) marker.put() context = Context(id=context_id) context._marker = marker context_result = ContextResult(context) self.assertIsNone(context_result._marker) self.assertTrue(context_result.has_errors()) marker.key.delete()