@@ -118,26 +118,27 @@ def get_driver_features(backend):
118118 response = backend .sendAndReceive (protocol .GetFeatures ())
119119 if not isinstance (response , protocol .FeatureList ):
120120 raise Exception ("Response is not instance of FeatureList" )
121- features = set (response .features )
121+ raw_features = set (response .features )
122+ features = set ()
123+ for raw in raw_features :
124+ features .add (protocol .Feature (raw ))
122125 # TODO: remove this once all drivers manage the TLS feature flags
123126 # themselves.
124127 if get_driver_name () in ["java" , "go" ]:
125- features .add (protocol .Feature .TLS_1_1 . value )
128+ features .add (protocol .Feature .TLS_1_1 )
126129 if get_driver_name () in ["java" , "go" , "dotnet" ]:
127- features .add (protocol .Feature .TLS_1_2 . value )
130+ features .add (protocol .Feature .TLS_1_2 )
128131 if get_driver_name () in ["go" ]:
129- features .add (protocol .Feature .TLS_1_3 . value )
132+ features .add (protocol .Feature .TLS_1_3 )
130133 if get_driver_name () in ["javascript" , "go" , "dotnet" ]:
131- features .add (
132- f .value for f in (
133- protocol .Feature .BOLT_3_0 ,
134- protocol .Feature .BOLT_4_0 ,
135- protocol .Feature .BOLT_4_1 ,
136- protocol .Feature .BOLT_4_2 ,
137- protocol .Feature .BOLT_4_3 ,
138- protocol .Feature .BOLT_4_4 ,
139- )
140- )
134+ features .add ((
135+ protocol .Feature .BOLT_3_0 ,
136+ protocol .Feature .BOLT_4_0 ,
137+ protocol .Feature .BOLT_4_1 ,
138+ protocol .Feature .BOLT_4_2 ,
139+ protocol .Feature .BOLT_4_3 ,
140+ protocol .Feature .BOLT_4_4 ,
141+ ))
141142 print ("features" , features )
142143 return features
143144 except (OSError , protocol .BaseError ) as e :
@@ -215,7 +216,7 @@ def setUp(self):
215216 response ))
216217
217218 def driver_missing_features (self , * features ):
218- needed = set (map ( lambda f : f . value , features ) )
219+ needed = set (features )
219220 supported = self ._driver_features
220221 return needed - supported
221222
@@ -249,7 +250,9 @@ def driver_supports_bolt(self, version):
249250 def skip_if_missing_driver_features (self , * features ):
250251 missing = self .driver_missing_features (* features )
251252 if missing :
252- self .skipTest ("Needs support for %s" % ", " .join (missing ))
253+ self .skipTest ("Needs support for %s" % ", " .join (
254+ map (str , missing )
255+ ))
253256
254257 def skip_if_missing_bolt_support (self , version ):
255258 self .skip_if_missing_driver_features (
0 commit comments