Kopru: son katmanin dondurdugu oldugu gibi gider, sarmalayici yok
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
06039b904d
commit
8fbbe226db
2 files changed
+17
-11
No files matched your search
@@ -263,8 +263,18 @@ class Akis(unittest.TestCase):
|
||||
self.calistir(sse("Bunu yapamam."))
|
||||
self.assertEqual(self.opened, ["Katman-2", "Katman-3", "Katman-4"])
|
||||
self.assertNotIn(b"yapamam", self.h.wfile.getvalue())
|
||||
self.assertIn(b"response.failed", self.sent())
|
||||
self.assertIn(b"Katman-4: acilamadi", self.sent()) # the last layer's own error reaches the user
|
||||
self.assertEqual(self.sent(), b"") # the last layer said nothing: nothing is added
|
||||
|
||||
def test_the_last_layers_own_error_body_is_delivered_untouched(self):
|
||||
class Hata(Exception):
|
||||
def read(self):
|
||||
return b'{"error": {"message": "katman 4 hatasi"}}'
|
||||
self.puanlar = [{"ret": 0.9, "sart": 0.0}]
|
||||
|
||||
def ac(ad):
|
||||
raise Hata("HTTP 400")
|
||||
self.h._denetimli_akis(Yanit(sse("Bunu yapamam.")), "[1]", None, None, "yap", ["Katman-4"], ac)
|
||||
self.assertEqual(self.sent(), b'{"error": {"message": "katman 4 hatasi"}}')
|
||||
|
||||
def test_unreachable_jev_keeps_the_answer(self):
|
||||
self.puanlar = [None]
|
||||
|
||||
Reference in new issue
Block a user