autotest: improved error msg for missing doc fields

Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
This commit is contained in:
Andrew Tridgell 2020-11-06 10:37:36 +11:00
parent 0c1d665818
commit 161f2a8d2f

View File

@ -1786,6 +1786,8 @@ class AutoTest(ABC):
"name": name,
"labels": [],
}
if getattr(thing.fields, 'field', None) is None:
raise NotAchievedException("no doc fields for %s" % name)
for field in thing.fields.field:
# print("field: (%s)" % str(field))
fieldname = field.get("name")