mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03: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
1 changed files with 5 additions and 4 deletions
|
@ -162,10 +162,11 @@ class App():
|
||||||
if k == 'builds':
|
if k == 'builds':
|
||||||
d['builds'] = []
|
d['builds'] = []
|
||||||
for build in v:
|
for build in v:
|
||||||
d['builds'].append(build.__dict__)
|
b = {k: v for k, v in build.__dict__.iteritems() if not k.startswith('_')}
|
||||||
else:
|
d['builds'].append(b)
|
||||||
k = App.attr_to_field(k)
|
elif not k.startswith('_'):
|
||||||
d[k] = v
|
f = App.attr_to_field(k)
|
||||||
|
d[f] = v
|
||||||
return d
|
return d
|
||||||
|
|
||||||
# Gets the value associated to a field name, e.g. 'Auto Name'
|
# Gets the value associated to a field name, e.g. 'Auto Name'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue