only show <devices> if there are devices (bug 639899)
This commit is contained in:
Родитель
f4fdcdfb77
Коммит
cbbf4f5547
|
@ -50,11 +50,13 @@
|
||||||
<gfxBlacklistEntry>
|
<gfxBlacklistEntry>
|
||||||
<os>{{ gfx.os }}</os>
|
<os>{{ gfx.os }}</os>
|
||||||
<vendor>{{ gfx.vendor }}</vendor>
|
<vendor>{{ gfx.vendor }}</vendor>
|
||||||
<devices>
|
{% if gfx.devices %}
|
||||||
{% for device in gfx.devices.split(' ') %}
|
<devices>
|
||||||
<device>{{ device }}</device>
|
{% for device in gfx.devices.split(' ') %}
|
||||||
{% endfor %}
|
<device>{{ device }}</device>
|
||||||
</devices>
|
{% endfor %}
|
||||||
|
</devices>
|
||||||
|
{% endif %}
|
||||||
<feature>{{ gfx.feature }}</feature>
|
<feature>{{ gfx.feature }}</feature>
|
||||||
<featureStatus>{{ gfx.feature_status }}</featureStatus>
|
<featureStatus>{{ gfx.feature_status }}</featureStatus>
|
||||||
<driverVersion>{{ gfx.driver_version }}</driverVersion>
|
<driverVersion>{{ gfx.driver_version }}</driverVersion>
|
||||||
|
|
|
@ -306,3 +306,9 @@ class BlocklistGfxTest(BlocklistTest):
|
||||||
for device, val in zip(devices.getElementsByTagName('device'),
|
for device, val in zip(devices.getElementsByTagName('device'),
|
||||||
self.gfx.devices.split(' ')):
|
self.gfx.devices.split(' ')):
|
||||||
eq_(device.childNodes[0].wholeText, val)
|
eq_(device.childNodes[0].wholeText, val)
|
||||||
|
|
||||||
|
def test_empty_devices(self):
|
||||||
|
self.gfx.devices = None
|
||||||
|
self.gfx.save()
|
||||||
|
r = self.client.get(self.fx4_url)
|
||||||
|
self.assertNotContains(r, '<devices>')
|
||||||
|
|
Загрузка…
Ссылка в новой задаче