Exemplo n.º 1
0
 def test_state_copied_check_mode(self, K, k):
     r = self.run_module("state=copied keyring=what key_id=2", check_mode=True)
     self.assert_run_not_changed(r)
     self.assertIn(call.has_key('2'), k.mock_calls)
     self.assertIn(call.export_key('2'), k.mock_calls)
     self.assertIn("key", r.result)
     self.assertEqual(r.result['key'], "a")
Exemplo n.º 2
0
 def test_state_absent_not_changed_check_mode(self, K, k):
     r = self.run_module("state=absent keyring=what key_id=3", check_mode=True)
     self.assert_run_not_changed(r)
     self.assertIn(call.has_key('3'), k.mock_calls)
     self.assertNotIn(call.remove_key('3'), k.mock_calls)
Exemplo n.º 3
0
 def test_state_absent_changed(self, K, k):
     r = self.run_module("state=absent keyring=what key_id=2")
     self.assert_run_changed(r)
     self.assertIn(call.has_key('2'), k.mock_calls)
     self.assertIn(call.remove_key('2'), k.mock_calls)