def test_write_statistics(self, event_loop):
    'Test that write_statistics calls update statistics with defined keys and value increments'

    @asyncio.coroutine
    def mock_s_update():
        return ''
    mockStorageClient = MagicMock(spec=StorageClient)
    mockAuditLogger = AuditLogger(mockStorageClient)
    with patch.object(FoglampProcess, '__init__'):
        with patch.object(Statistics, 'update', return_value=mock_s_update()) as mock_stats_update:
            with patch.object(mockAuditLogger, '__init__', return_value=None):
                p = Purge(loop=event_loop)
                p._storage = mockStorageClient
                p.write_statistics(1, 2)
                mock_stats_update.assert_has_calls([call('PURGED', 1), call('UNSNPURGED', 2)])
Test that write_statistics calls update statistics with defined keys and value increments
def test_write_statistics(self, event_loop):
    

    @asyncio.coroutine
    def mock_s_update():
        return 
    mockStorageClient = MagicMock(spec=StorageClient)
    mockAuditLogger = AuditLogger(mockStorageClient)
    with patch.object(FoglampProcess, '__init__'):
        with patch.object(Statistics, 'update', return_value=mock_s_update()) as mock_stats_update:
            with patch.object(mockAuditLogger, '__init__', return_value=None):
                p = Purge(loop=event_loop)
                p._storage = mockStorageClient
                p.write_statistics(1, 2)
                mock_stats_update.assert_has_calls([call('PURGED', 1), call('UNSNPURGED', 2)])