diff --git a/tests/openwisp/test_backend.py b/tests/openwisp/test_backend.py index 41768c395..f421d8ebc 100644 --- a/tests/openwisp/test_backend.py +++ b/tests/openwisp/test_backend.py @@ -15,7 +15,7 @@ class TestBackend(unittest.TestCase, _TabsMixin): """ config = { "general": { - "hostname": "openwisp_test" + "hostname": "openwisp-test" }, "interfaces": [ { @@ -118,7 +118,7 @@ class TestBackend(unittest.TestCase, _TabsMixin): def test_uci(self): o = OpenWisp({ "general": { - "hostname": "openwisp_test" + "hostname": "openwisp-test" } }) tar = tarfile.open(fileobj=o.generate(), mode='r') @@ -127,7 +127,7 @@ def test_uci(self): expected = self._tabs("""package system config system - option hostname 'openwisp_test' + option hostname 'openwisp-test' option timezone 'UTC' """) self.assertEqual(contents, expected) diff --git a/tests/openwrt/test_system.py b/tests/openwrt/test_system.py index dfcfa657a..a996a89af 100644 --- a/tests/openwrt/test_system.py +++ b/tests/openwrt/test_system.py @@ -12,7 +12,7 @@ class TestSystemRenderer(unittest.TestCase, _TabsMixin): def test_system(self): o = OpenWrt({ "general": { - "hostname": "test_system", + "hostname": "test-system", "timezone": "Europe/Rome", "custom_setting": True, "empty_setting1": None, @@ -23,7 +23,7 @@ def test_system(self): config system option custom_setting '1' - option hostname 'test_system' + option hostname 'test-system' option timezone 'CET-1CEST,M3.5.0,M10.5.0/3' """) self.assertEqual(o.render(), expected) diff --git a/tests/test_bin.py b/tests/test_bin.py index 8dfd4ba15..02df73522 100644 --- a/tests/test_bin.py +++ b/tests/test_bin.py @@ -35,7 +35,7 @@ def test_empty_netjson(self): def test_templates(self): config = json.dumps({ - 'general': {'hostname': 'template_test'} + 'general': {'hostname': 'template-test'} }) template1 = json.dumps({ 'interfaces': [ @@ -68,7 +68,7 @@ def test_templates(self): command = """netjsonconfig --config '{0}' -b openwrt -m render --templates '{1}' '{2}'""" command = command.format(config, template1, template2) output = subprocess.check_output(command, shell=True).decode() - self.assertIn("hostname 'template_test'", output) + self.assertIn("hostname 'template-test'", output) self.assertIn("interface 'eth0'", output) self.assertIn("interface 'wlan0'", output) @@ -101,7 +101,7 @@ def test_arg_exception(self): def test_valid_arg(self): config = json.dumps({ - 'general': {'hostname': 'template_test'}, + 'general': {'hostname': 'template-test'}, 'files': [ { 'path': '/etc/test.txt',