Add tests for compose node name functionality
diff --git a/reclass/tests/data/03/classes/a.yml b/reclass/tests/data/03/classes/a.yml
new file mode 100644
index 0000000..748a297
--- /dev/null
+++ b/reclass/tests/data/03/classes/a.yml
@@ -0,0 +1,6 @@
+parameters:
+  a: 1
+  alpha:
+  - ${a}
+  beta:
+    a: ${a}
diff --git a/reclass/tests/data/03/classes/b.yml b/reclass/tests/data/03/classes/b.yml
new file mode 100644
index 0000000..cce2609
--- /dev/null
+++ b/reclass/tests/data/03/classes/b.yml
@@ -0,0 +1,6 @@
+parameters:
+  b: 2
+  alpha:
+  - ${b}
+  beta:
+    b: ${b}
diff --git a/reclass/tests/data/03/classes/c.yml b/reclass/tests/data/03/classes/c.yml
new file mode 100644
index 0000000..7441417
--- /dev/null
+++ b/reclass/tests/data/03/classes/c.yml
@@ -0,0 +1,6 @@
+parameters:
+  c: 3
+  alpha:
+  - ${c}
+  beta:
+    c: ${c}
diff --git a/reclass/tests/data/03/classes/d.yml b/reclass/tests/data/03/classes/d.yml
new file mode 100644
index 0000000..e61a1ff
--- /dev/null
+++ b/reclass/tests/data/03/classes/d.yml
@@ -0,0 +1,6 @@
+parameters:
+  d: 4
+  alpha:
+  - ${d}
+  beta:
+    d: ${d}
diff --git a/reclass/tests/data/03/nodes/alpha/one.yml b/reclass/tests/data/03/nodes/alpha/one.yml
new file mode 100644
index 0000000..f2b613d
--- /dev/null
+++ b/reclass/tests/data/03/nodes/alpha/one.yml
@@ -0,0 +1,3 @@
+classes:
+- a
+- b
diff --git a/reclass/tests/data/03/nodes/alpha/two.yml b/reclass/tests/data/03/nodes/alpha/two.yml
new file mode 100644
index 0000000..b020af3
--- /dev/null
+++ b/reclass/tests/data/03/nodes/alpha/two.yml
@@ -0,0 +1,3 @@
+classes:
+- a
+- c
diff --git a/reclass/tests/data/03/nodes/beta/one.yml b/reclass/tests/data/03/nodes/beta/one.yml
new file mode 100644
index 0000000..168a4fb
--- /dev/null
+++ b/reclass/tests/data/03/nodes/beta/one.yml
@@ -0,0 +1,3 @@
+classes:
+- b
+- c
diff --git a/reclass/tests/data/03/nodes/beta/two.yml b/reclass/tests/data/03/nodes/beta/two.yml
new file mode 100644
index 0000000..56c6343
--- /dev/null
+++ b/reclass/tests/data/03/nodes/beta/two.yml
@@ -0,0 +1,3 @@
+classes:
+- c
+- d
diff --git a/reclass/tests/test_core.py b/reclass/tests/test_core.py
index b20b268..ced18e8 100644
--- a/reclass/tests/test_core.py
+++ b/reclass/tests/test_core.py
@@ -71,6 +71,21 @@
         params = { 'test1': 1, 'test2': 2, 'one_beta': 1, 'two_beta': 2, '_reclass_': { 'environment': 'base', 'name': { 'full': 'top_relative', 'short': 'top_relative' } } }
         self.assertEqual(node['parameters'], params)
 
+    def test_compose_node_names(self):
+        reclass = self._core('03', {'compose_node_name': True})
+        alpha_one_node = reclass.nodeinfo('alpha.one')
+        alpha_one_res = {'a': 1, 'alpha': [1, 2], 'beta': {'a': 1, 'b': 2}, 'b': 2, '_reclass_': {'environment': 'base', 'name': {'full': 'alpha.one', 'short': 'alpha'}}}
+        alpha_two_node = reclass.nodeinfo('alpha.two')
+        alpha_two_res = {'a': 1, 'alpha': [1, 3], 'beta': {'a': 1, 'c': 3}, 'c': 3, '_reclass_': {'environment': 'base', 'name': {'full': 'alpha.two', 'short': 'alpha'}}}
+        beta_one_node = reclass.nodeinfo('beta.one')
+        beta_one_res = {'alpha': [2, 3], 'beta': {'c': 3, 'b': 2}, 'b': 2, 'c': 3, '_reclass_': {'environment': 'base', 'name': {'full': 'beta.one', 'short': 'beta'}}}
+        beta_two_node = reclass.nodeinfo('beta.two')
+        beta_two_res = {'alpha': [3, 4], 'c': 3, 'beta': {'c': 3, 'd': 4}, 'd': 4, '_reclass_': {'environment': u'base', 'name': {'full': u'beta.two', 'short': u'beta'}}}
+        self.assertEqual(alpha_one_node['parameters'], alpha_one_res)
+        self.assertEqual(alpha_two_node['parameters'], alpha_two_res)
+        self.assertEqual(beta_one_node['parameters'], beta_one_res)
+        self.assertEqual(beta_two_node['parameters'], beta_two_res)
+
 
 if __name__ == '__main__':
     unittest.main()