def test_search_context(self) -> None:
        """Tests that we can filter observables based on context subfields."""
        time.sleep(1)
        response = client.post(
            "/api/v2/observables/search",
            json={"query": {"context.source": "tests:"}, "page": 0, "count": 10},
        )
        self.assertEqual(response.status_code, 200)
        data = response.json()
        self.assertEqual(len(data["observables"]), 1)
        self.assertEqual(data["observables"][0]["value"], "tomchop2.me")
Tests that we can filter observables based on context subfields.
tests/apiv2/observables.py