mirror of
https://github.com/sprockets/sprockets.clients.memcached.git
synced 2024-11-29 03:00:23 +00:00
Add simple integration tests
This commit is contained in:
parent
46e0869263
commit
aa4cb3e06b
2 changed files with 18 additions and 0 deletions
|
@ -15,6 +15,8 @@ install:
|
|||
script: nosetests
|
||||
after_success:
|
||||
- coveralls
|
||||
services:
|
||||
- memcached
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: sprockets
|
||||
|
|
16
tests.py
16
tests.py
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue