Skip to content

Commit

Permalink
Test rellated fixes
Browse files Browse the repository at this point in the history
+ JSON-RPC tests disabled for Odoo 10.0 due to
[issue](odoo/odoo#13694)
  • Loading branch information
katyukha committed Oct 6, 2016
1 parent 8a9faf0 commit 472ca20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -47,6 +47,7 @@ env:

# There is a bug in Odoo 10.0rc1c on drop database via JSON-RPC
# So temporary disable tests for json-rpc on odoo-10.0
# Odoo issue: https://github.com/odoo/odoo/issues/13694
#- ODOO_VERSION="10.0"
#ODOO_RELEASE="10.0rc1c"
#ODOO_PACKAGE="odoo"
Expand Down
5 changes: 4 additions & 1 deletion openerp_proxy/connection/jsonrpc.py
Expand Up @@ -59,7 +59,9 @@ def prepare_method_data(self, *args):
}

def __call__(self, *args):
data = json.dumps(self.prepare_method_data(*args))
method_data = self.prepare_method_data(*args)
data = json.dumps(method_data)

# Call rpc
try:
res = requests.post(self.__url, data=data, headers={
Expand All @@ -80,6 +82,7 @@ def __call__(self, *args):
"url": res.url,
"code": res.status_code,
"content": res.text[:2000],
"method_data": method_data,
}
logger.error("Cannot decode JSON")
raise JSONRPCError("Cannot decode JSON: %s" % info)
Expand Down
1 change: 0 additions & 1 deletion openerp_proxy/tests/test_session.py
Expand Up @@ -241,7 +241,6 @@ def test_30_del_client(self):
session.save()
del session


# recreate session
session = Session(self._session_file_path)

Expand Down

0 comments on commit 472ca20

Please sign in to comment.