Esempio n. 1
0
 def test_gen_inventory_lines(self):
     n = ansible_common.AnsibleNode
     a = ansible_common.AnsibleNodeDict(n, [{
         "name": "name", "user": "******", "password": "******",
         "role": "role",
     }])
     self.assertEqual(a.gen_all_inventory_lines(),
                      ["name ansible_ssh_pass=PASS ansible_user=user"])
Esempio n. 2
0
 def test_gen_inventory_lines_for_all_of_type(self):
     n = ansible_common.AnsibleNode()
     a = ansible_common.AnsibleNodeDict(n, {})
     self.assertEqual(a.gen_inventory_lines_for_all_of_type(""), [])
Esempio n. 3
0
 def test_ansible_node_dict_get(self):
     n = ansible_common.AnsibleNode()
     a = ansible_common.AnsibleNodeDict(n, {})
     self.assertIsNone(a.get(""))
Esempio n. 4
0
 def test_ansible_node_dict_iter(self):
     n = ansible_common.AnsibleNode()
     a = ansible_common.AnsibleNodeDict(n, {})
     for _ in a:
         pass
Esempio n. 5
0
 def test_ansible_node_dict_repr(self):
     n = ansible_common.AnsibleNode()
     a = ansible_common.AnsibleNodeDict(n, {})
     repr(a)
Esempio n. 6
0
 def test_ansible_node_dict_len(self):
     n = ansible_common.AnsibleNode()
     a = ansible_common.AnsibleNodeDict(n, {})
     len(a)
Esempio n. 7
0
 def test_ansible_node_dict(self):
     n = ansible_common.AnsibleNode
     ansible_common.AnsibleNodeDict(n, {})
Esempio n. 8
0
 def test_ansible_node_dict_repr(self):
     n = ansible_common.AnsibleNode
     a = ansible_common.AnsibleNodeDict(n, {})
     self.assertEqual('{}', repr(a))
Esempio n. 9
0
 def test_ansible_node_dict_len(self):
     n = ansible_common.AnsibleNode
     a = ansible_common.AnsibleNodeDict(n, {})
     self.assertEqual(0, len(a))