only add errors to the metadata when there are errors
This commit is contained in:
Родитель
60eaec8c32
Коммит
d25eedd1a5
|
@ -141,7 +141,8 @@ class Plugin(object):
|
|||
for stylesheet in self.stylesheets
|
||||
]
|
||||
|
||||
md['errors'] = self._errors
|
||||
if self._errors:
|
||||
md['errors'] = self._errors
|
||||
self._metadata = md
|
||||
return md
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ def test_default_plugin_registration():
|
|||
assert "plugin/file/testplugins/plugin1/resources/foo/foo.css" in response.body
|
||||
assert "NOT THERE" not in response.body
|
||||
data = loads(response.body)
|
||||
md = data["plugin1"]
|
||||
assert "errors" not in md
|
||||
assert "plugin3" in data
|
||||
md = data['plugin3']
|
||||
assert "errors" in md
|
||||
|
|
Загрузка…
Ссылка в новой задаче