- def test_get_found(self):
- mock=Mock()
- mock.get_cmd.return_value={'nsr:ns-instance-config': { 'nsr': [{'name': 'foo' }]}}
- assert ns.Ns(mock).get('foo')
-
- def test_get_monitoring_notfound(self):
- mock=Mock()
- mock.get_cmd.return_value='foo'
- self.assertRaises(NotFound,ns.Ns(mock).get_monitoring,'bar')
+ def test_get_monitoring_notfound(self):
+ mock = Mock()
+ mock.get_cmd.return_value = 'foo'
+ self.assertRaises(NotFound, ns.Ns(mock, client=client.Client(host='127.0.0.1')).get_monitoring, 'bar')