mirror of
https://github.com/sprockets/sprockets.clients.memcached.git
synced 2024-11-29 11:19:54 +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
|
script: nosetests
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
|
services:
|
||||||
|
- memcached
|
||||||
deploy:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
user: sprockets
|
user: sprockets
|
||||||
|
|
16
tests.py
16
tests.py
|
@ -52,3 +52,19 @@ class TestClientWrapsMemcacheClient(unittest.TestCase):
|
||||||
False,
|
False,
|
||||||
0,
|
0,
|
||||||
True)
|
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