Add simple integration tests

This commit is contained in:
Gavin M. Roy 2014-09-03 12:04:12 -04:00
parent 46e0869263
commit aa4cb3e06b
2 changed files with 18 additions and 0 deletions

View file

@ -15,6 +15,8 @@ install:
script: nosetests
after_success:
- coveralls
services:
- memcached
deploy:
provider: pypi
user: sprockets

View file

@ -52,3 +52,19 @@ class TestClientWrapsMemcacheClient(unittest.TestCase):
False,
0,
True)
class ClientIntegrationTests(unittest.TestCase):
def setUp(self):
self.client = memcached.Client()
self.client.incr('test')
if any([s.deaduntil for s in self.client.servers]):
raise unittest.SkipTest('No memcached daemon present')
def test_that_incr_returns_one(self):
self.assertEqual(self.client.incr('test-incr'), 1)
def test_that_set_key_is_gettable(self):
self.client.set('foo', 'bar', 60)
self.assertEqual(self.client.get('foo'), 'bar')