@pytest.mark.parametrize('conf, expected_return', [({'retainUnsent': {'value': 'False'}, 'age': {'value': '0'}, 'size': {'value': '0'}}, (0, 0)), ({'retainUnsent': {'value': 'True'}, 'age': {'value': '0'}, 'size': {'value': '0'}}, (0, 0))])
def test_purge_data_no_data_purged(self, event_loop, conf, expected_return):
    'Test that purge_data logs message when no data was purged'

    @asyncio.coroutine
    def mock_audit_info():
        return ''
    mockStorageClient = MagicMock(spec=StorageClient)
    mockAuditLogger = AuditLogger(mockStorageClient)
    with patch.object(FoglampProcess, '__init__'):
        with patch.object(mockAuditLogger, '__init__', return_value=None):
            p = Purge(loop=event_loop)
            p._logger = logger
            p._logger.info = MagicMock()
            p._logger.error = MagicMock()
            p._storage = MagicMock(spec=StorageClient)
            p._readings_storage = MagicMock(spec=ReadingsStorageClient)
            audit = p._audit
            with patch.object(p._readings_storage, 'purge', side_effect=self.store_purge):
                with patch.object(audit, 'information', return_value=mock_audit_info()):
                    assert (expected_return == p.purge_data(conf))
                    p._logger.info.assert_called_once_with('No rows purged')
Test that purge_data logs message when no data was purged
@pytest.mark.parametrize('conf, expected_return', [({'retainUnsent': {'value': 'False'}, 'age': {'value': '0'}, 'size': {'value': '0'}}, (0, 0)), ({'retainUnsent': {'value': 'True'}, 'age': {'value': '0'}, 'size': {'value': '0'}}, (0, 0))])
def test_purge_data_no_data_purged(self, event_loop, conf, expected_return):
    

    @asyncio.coroutine
    def mock_audit_info():
        return 
    mockStorageClient = MagicMock(spec=StorageClient)
    mockAuditLogger = AuditLogger(mockStorageClient)
    with patch.object(FoglampProcess, '__init__'):
        with patch.object(mockAuditLogger, '__init__', return_value=None):
            p = Purge(loop=event_loop)
            p._logger = logger
            p._logger.info = MagicMock()
            p._logger.error = MagicMock()
            p._storage = MagicMock(spec=StorageClient)
            p._readings_storage = MagicMock(spec=ReadingsStorageClient)
            audit = p._audit
            with patch.object(p._readings_storage, 'purge', side_effect=self.store_purge):
                with patch.object(audit, 'information', return_value=mock_audit_info()):
                    assert (expected_return == p.purge_data(conf))
                    p._logger.info.assert_called_once_with('No rows purged')