From ff1408420159488a106492ccd11dd234967029b6 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Thu, 20 Aug 2015 15:58:26 +0200 Subject: Imported Upstream version 0.1.29 --- reconfigure/tests/configs/hosts_tests.py | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 reconfigure/tests/configs/hosts_tests.py (limited to 'reconfigure/tests/configs/hosts_tests.py') diff --git a/reconfigure/tests/configs/hosts_tests.py b/reconfigure/tests/configs/hosts_tests.py new file mode 100644 index 0000000..e202929 --- /dev/null +++ b/reconfigure/tests/configs/hosts_tests.py @@ -0,0 +1,40 @@ +from reconfigure.configs import HostsConfig +from base_test import BaseConfigTest + + +class FSTabConfigTest (BaseConfigTest): + sources = { + None: """a1 h1 a2 a3 a4 +a5 h2 +a6 h3 a7 +""" + } + result = { + 'hosts': [ + { + 'address': 'a1', + 'name': 'h1', + 'aliases': [ + {'name': 'a2'}, + {'name': 'a3'}, + {'name': 'a4'}, + ] + }, + { + 'address': 'a5', + 'aliases': [], + 'name': 'h2', + }, + { + 'address': 'a6', + 'name': 'h3', + 'aliases': [ + {'name': 'a7'}, + ] + }, + ] + } + config = HostsConfig + + +del BaseConfigTest -- cgit v1.2.3