mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 17:06:09 +00:00
fix(interfaces): a link state libvirt reports as unknown is said in words
libvirt names an unknown link state "unknown", which the interfaces page showed as "Link unknown" in English in every language. It is now the translated "Link unknown", as when there is no state.
This commit is contained in:
parent
70b0b42f8d
commit
00a44f7621
2 changed files with 10 additions and 1 deletions
|
|
@ -157,3 +157,12 @@ class UnchangeableHostTestCase(TestCase):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
for method in (conn.start_iface, conn.stop_iface, conn.delete_iface):
|
||||
method.assert_not_called()
|
||||
|
||||
|
||||
class LinkBadgeTestCase(TestCase):
|
||||
def test_a_link_state_libvirt_calls_unknown_is_said_in_words(self):
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
for link in ("unknown", None):
|
||||
self.assertIn("Link unknown", render_to_string("link_badge.html", {"link": link}))
|
||||
self.assertIn("Link dormant", render_to_string("link_badge.html", {"link": "dormant"}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue