mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 15:02:51 +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':
|
||||
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…
Add table
Add a link
Reference in a new issue