diff --git a/client/ledis-py/tests/test_others.py b/client/ledis-py/tests/test_others.py new file mode 100644 index 0000000..d57d332 --- /dev/null +++ b/client/ledis-py/tests/test_others.py @@ -0,0 +1,31 @@ +# coding: utf-8 +# Test Cases for other commands + +import unittest +import sys +sys.path.append('..') + +import ledis +from ledis._compat import b +from ledis import ResponseError + +l = ledis.Ledis(port=6380) + +class TestOtherCommands(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + # server information + def test_echo(self): + assert l.echo('foo bar') == b('foo bar') + + def test_ping(self): + assert l.ping() + + def test_select(self): + assert l.select('1') + assert l.select('15') + self.assertRaises(ResponseError, lambda: l.select('16')) \ No newline at end of file