Skip to content
Permalink
Browse files
Allow multiple primary key fields to be specified for processing tests
`
  • Loading branch information
nyalldawson committed Sep 8, 2017
1 parent c750cb2 commit e9fd409
Showing 1 changed file with 5 additions and 1 deletion.
@@ -105,7 +105,11 @@ def checkLayersEqual(self, layer_expected, layer_result, use_asserts=False, **kw

def sort_by_pk_or_fid(f):
if 'pk' in kwargs and kwargs['pk'] is not None:
return f[kwargs['pk']]
key = kwargs['pk']
if isinstance(key, list) or isinstance(key, tuple):
return [f[k] for k in key]
else:
return f[kwargs['pk']]
else:
return f.id()

0 comments on commit e9fd409

Please sign in to comment.