def test_request_subset_of_available_node_features(self): params = ParameterServer() requested_features = GraphObserver.available_node_attributes()[0:5] params["ML"]["GraphObserver"]["EnabledNodeFeatures"] = requested_features observer = GraphObserver(params=params) self.assertEqual( observer._enabled_node_attribute_keys, requested_features)
def test_request_partially_invalid_node_features(self): params = ParameterServer() requested_features =\ GraphObserver.available_node_attributes()[0:5] + ['invalid'] params["ML"]["GraphObserver"]["EnabledNodeFeatures"] = requested_features observer = GraphObserver(params=params) # remove invalid feature from expected list requested_features.pop(-1) self.assertEqual( observer._enabled_node_attribute_keys, requested_features)