Skip to content

Instantly share code, notes, and snippets.

@bodepd
Created September 19, 2014 19:30
Show Gist options
  • Save bodepd/7dbee3d50ce7818230b8 to your computer and use it in GitHub Desktop.
Save bodepd/7dbee3d50ce7818230b8 to your computer and use it in GitHub Desktop.
def test_get_failures(self):
with mock.patch.object(self.do, '_etcd') as etcd:
results = {
'should_pass': [
[],
[self.EtcdKey('/status/puppet/failed')],
#[self.EtcdKey('/status/validation/failed')]
]
}
for k,v in results.iteritems():
for data in v:
etcd.read.return_value = self.EtcdResult(data)
self.assertEquals(True, self.do.get_failures(self))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment