def test_lastpass_plugin_disconnected(self): lookup_plugin = LookupModule() entry = MOCK_ENTRIES[0] entry_id = entry.get('id') with self.assertRaises(AnsibleError): lookup_plugin.run([entry_id], field='password')
def test_lastpass_plugin_normal(self): lookup_plugin = LookupModule() for entry in MOCK_ENTRIES: entry_id = entry.get('id') for k, v in six.iteritems(entry): self.assertEqual(v.strip(), lookup_plugin.run([entry_id], field=k)[0])