summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-12-15 11:44:53 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2016-12-29 03:10:01 +0100
commitd215cedd5efdbedbaaf9e62626b9178b364d55f7 (patch)
tree141718bbabd3de952d524df20db52cbfa53b6e7c /tests
parent5481d60a470cd70be5a96b4e674987f41b4481b7 (diff)
[bug] avoid unicode conversion bug
encode to ascii any parameter passed as unicode.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test_web_api.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/core/test_web_api.py b/tests/unit/core/test_web_api.py
index 6d61686..f19505d 100644
--- a/tests/unit/core/test_web_api.py
+++ b/tests/unit/core/test_web_api.py
@@ -142,7 +142,15 @@ class RESTApiTests(unittest.TestCase):
def tearDown(self):
return self.plainPort.stopListening()
+ @defer.inlineCallbacks
+ def test_param_encoding(self):
+ params = ['test_types', 1, True]
+ call = yield self.makeAPICall('core/version',
+ params=params)
+ self.assertCall(call, self.canned.backend.version)
+
# core commands
+ # TODO these tests can be generated dinamically
@defer.inlineCallbacks
def test_core_version(self):