def test_query_and_context_validation(self):
        """Test validation of query and context requirements."""
        # Lexical search requires query
        with self.assertRaises(ValidationError) as cm:
            SearchQuery(searchMethod=SearchMethod.LEXICAL)
        self.assertIn("Query(q) is required for lexical search", str(cm.exception))
        
        # Tensor search requires either query or context
        with self.assertRaises(ValidationError) as cm:
            SearchQuery(searchMethod=SearchMethod.TENSOR)
        self.assertIn("One of Query(q) or context is required for TENSOR search", str(cm.exception))
Test validation of query and context requirements.
tests/unit_tests/marqo/tensor_search/test_api_models.py