Ejemplo n.º 1
0
 def _build_serving_request(self, feature_set, entity_keys):
     """Helper function to build serving service request."""
     return QueryFeaturesRequest(
         entityName=feature_set.entity,
         entityId=entity_keys,
         featureId=feature_set.features,
     )
Ejemplo n.º 2
0
    def test_build_serving_request(self, client):
        feature_set = FeatureSet("entity", ["entity.feat1", "entity.feat2"])

        req = client._build_serving_request(feature_set, ["1", "2", "3"])
        expected = QueryFeaturesRequest(entityName="entity",
                                        entityId=["1", "2", "3"],
                                        featureId=feature_set.features)
        assert req == expected