From f52f7060a6f9edd1fb9ba8061123f2aca2d2d0c3 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Tue, 23 Apr 2024 10:16:06 -0700 Subject: [PATCH] test_protocol.test_for_id_object_missing_source_protocol: mock network fetch --- tests/test_protocol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_protocol.py b/tests/test_protocol.py index 50d3135..5151984 100644 --- a/tests/test_protocol.py +++ b/tests/test_protocol.py @@ -114,7 +114,8 @@ class ProtocolTest(TestCase): self.store_object(id='http://u.i/obj', source_protocol='ui') self.assertEqual(UIProtocol, Protocol.for_id('http://u.i/obj')) - def test_for_id_object_missing_source_protocol(self): + @patch('requests.get', return_value=requests_response()) + def test_for_id_object_missing_source_protocol(self, _): self.store_object(id='http://ba.d/obj') self.assertIsNone(Protocol.for_id('http://ba.d/obj'))