From baa816c820cd658efb351da7a1db602fa6773b8f Mon Sep 17 00:00:00 2001 From: gordon chung Date: Fri, 22 Aug 2014 16:09:54 -0400 Subject: [PATCH] fix errors/warnings in tests sphinxext tests reference paths that don't exist. this patch corrects it. Change-Id: I6a9355a53e2f72de7eab17fc117334843ff8d369 --- tests/sphinxexample/conf.py | 2 +- tests/sphinxexample/document.rst | 6 +++--- tests/test_flask.py | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/sphinxexample/conf.py b/tests/sphinxexample/conf.py index 6814dc3..ec478dd 100644 --- a/tests/sphinxexample/conf.py +++ b/tests/sphinxexample/conf.py @@ -129,7 +129,7 @@ html_title = "WSME %s" % release # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/tests/sphinxexample/document.rst b/tests/sphinxexample/document.rst index 374eaec..41af798 100644 --- a/tests/sphinxexample/document.rst +++ b/tests/sphinxexample/document.rst @@ -4,7 +4,7 @@ API Documentation test Example ~~~~~~~ -.. wsme:root:: wsme.sphinxext.SampleService +.. wsme:root:: wsmeext.sphinxext.SampleService :webpath: /api .. wsme:type:: MyType @@ -26,10 +26,10 @@ Example An integer -.. autotype:: wsme.sphinxext.SampleType +.. autotype:: wsmeext.sphinxext.SampleType :members: -.. autoservice:: wsme.sphinxext.SampleService +.. autoservice:: wsmeext.sphinxext.SampleService :members: diff --git a/tests/test_flask.py b/tests/test_flask.py index 807d272..abdcd10 100644 --- a/tests/test_flask.py +++ b/tests/test_flask.py @@ -162,10 +162,12 @@ class FlaskrTestCase(unittest.TestCase): def test_serversideerror(self): r = self.app.get('/divide_by_zero') assert r.status_code == 500 + data = json.loads(r.data) self.assertEquals( - r.data, - '{"debuginfo": null, "faultcode": "Server", "faultstring": ' - '"integer division or modulo by zero"}' + data, + {"debuginfo": None, + "faultcode": "Server", + "faultstring": "integer division or modulo by zero"} ) if __name__ == '__main__':