
memcached test layer
********************

This layer starts and stops a memcached daemon on given port (default
is 11222)

>>> import os
>>> here = os.path.dirname(__file__)
>>> project_root = os.path.dirname(os.path.dirname(os.path.dirname(here)))
>>> path = os.path.join(project_root, 'parts', 'memcached', 'bin', 'memcached')
>>> from lovely.testlayers import memcached
>>> ml = memcached.MemcachedLayer('ml', path=path)

So let us setup the server.

>>> ml.setUp()

Now we can acces memcached on port 11222.

>>> import telnetlib
>>> tn =  telnetlib.Telnet('localhost', 11222)
>>> tn.close()

No more after teardown.

>>> ml.tearDown()
>>> tn =  telnetlib.Telnet('localhost', 11222)
Traceback (most recent call last):
...
error:...Connection refused...
