Re: [openstack-dev] [Cinder] How to mock the LOG inside cinder driver

2014-06-03 Thread Joshua Harlow
pment Mailing List (not for usage questions)" mailto:openstack-dev@lists.openstack.org>> Subject: [openstack-dev] [Cinder] How to mock the LOG inside cinder driver Hi, whats the right way to mock the LOG variable inside the driver ? I am mocking mock.patch.object(glusterfs,

Re: [openstack-dev] [Cinder] How to mock the LOG inside cinder driver

2014-06-03 Thread Mike Perez
On 21:46 Tue 03 Jun , Deepak Shetty wrote: > Hi, whats the right way to mock the LOG variable inside the > driver ? I am mocking mock.patch.object(glusterfs, 'LOG') as mock_logger Please provide a paste[1] of the patch. [1] - http://paste.openstack.org -- Mike Perez __

[openstack-dev] [Cinder] How to mock the LOG inside cinder driver

2014-06-03 Thread Deepak Shetty
Hi, whats the right way to mock the LOG variable inside the driver ? I am mocking mock.patch.object(glusterfs, 'LOG') as mock_logger and then doing... mock_logger.warning.assert_called_once() - which passes and is expected to pass per my code but mock_logger.debug.assert_called_once() - shud f