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