File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,19 @@ def test_search_observables(self, mock_post):
6262 json = {"query" : {"value" : "test_value" }, "count" : 0 },
6363 )
6464
65+ @patch ("yeti.api.requests.Session.post" )
66+ def test_search_bloom (self , mock_post ):
67+ mock_response = MagicMock ()
68+ mock_response .content = b'[{"value": "test.com", "hits": ["filter1"]}]'
69+ mock_post .return_value = mock_response
70+
71+ result = self .api .search_bloom (["test.com" ])
72+ self .assertEqual (result , [{"value" : "test.com" , "hits" : ["filter1" ]}])
73+ mock_post .assert_called_with (
74+ "http://fake-url/api/v2/bloom/search" ,
75+ json = {"values" : ["test.com" ]},
76+ )
77+
6578 @patch ("yeti.api.requests.Session.post" )
6679 def test_new_entity (self , mock_post ):
6780 mock_response = MagicMock ()
You can’t perform that action at this time.
0 commit comments