@@ -254,7 +254,7 @@ def run_checks():
254
254
it = vl .getFeatures (req )
255
255
f = QgsFeature ()
256
256
self .assertTrue (it .nextFeature (f ))
257
- self .assertTrue (f .id () == 5 )
257
+ self .assertEqual (f .id (), 5 )
258
258
self .assertEqual (f .attributes (), [5 , NULL , 2 , 16 ])
259
259
self .assertEqual ([field .name () for field in f .fields ()], ['fid' , 'GEOMETRY' , 'type' , 'value' ])
260
260
@@ -263,7 +263,7 @@ def run_checks():
263
263
it = vl .getFeatures (req )
264
264
f = QgsFeature ()
265
265
self .assertTrue (it .nextFeature (f ))
266
- self .assertTrue (f .id () == 5 )
266
+ self .assertEqual (f .id (), 5 )
267
267
self .assertEqual (f .attributes (), [5 , NULL , 2 , 16 ])
268
268
self .assertEqual ([field .name () for field in f .fields ()], ['fid' , 'GEOMETRY' , 'type' , 'value' ])
269
269
@@ -272,7 +272,7 @@ def run_checks():
272
272
it = vl .getFeatures (req )
273
273
f = QgsFeature ()
274
274
self .assertTrue (it .nextFeature (f ))
275
- self .assertTrue (f .id () == 5 )
275
+ self .assertEqual (f .id (), 5 )
276
276
self .assertEqual (f .attributes (), [5 , NULL , 2 , 16 ])
277
277
self .assertEqual ([field .name () for field in f .fields ()], ['fid' , 'GEOMETRY' , 'type' , 'value' ])
278
278
@@ -283,10 +283,7 @@ def run_checks():
283
283
ids = []
284
284
while it .nextFeature (f ):
285
285
ids .append (f .id ())
286
- self .assertTrue (len (ids ) == 3 )
287
- self .assertTrue (3 in ids )
288
- self .assertTrue (4 in ids )
289
- self .assertTrue (5 in ids )
286
+ self .assertCountEqual (ids , [3 , 4 , 5 ])
290
287
291
288
run_checks ()
292
289
# Check that subset string is correctly set on reload
0 commit comments