mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Fix tests by not checking private attributes
All attrs starting with '_' (e.g. _foo or __bar) are used internally, so not very relevant for the metadata test anyway.
This commit is contained in:
parent
2711f1c868
commit
cb8d93e443
@ -162,10 +162,11 @@ class App():
|
||||
if k == 'builds':
|
||||
d['builds'] = []
|
||||
for build in v:
|
||||
d['builds'].append(build.__dict__)
|
||||
else:
|
||||
k = App.attr_to_field(k)
|
||||
d[k] = v
|
||||
b = {k: v for k, v in build.__dict__.iteritems() if not k.startswith('_')}
|
||||
d['builds'].append(b)
|
||||
elif not k.startswith('_'):
|
||||
f = App.attr_to_field(k)
|
||||
d[f] = v
|
||||
return d
|
||||
|
||||
# Gets the value associated to a field name, e.g. 'Auto Name'
|
||||
|
Loading…
Reference in New Issue
Block a user