From 84beed0efc884d7d83f9f1918da33b5023490886 Mon Sep 17 00:00:00 2001 From: jonnary Date: Mon, 24 Jun 2019 01:01:29 +0800 Subject: [PATCH] Fix uint test test_json_format and Solve pep8 msgfmt error For json format we only need check the json result. For pep8 error: xargs: msgfmt: No such file or directory ERROR: InvocationError for command /bin/bash -c 'find senlinclient..' http://logs.openstack.org/92/666992/2/gate/openstack-tox-pep8/fdbc082/job-output.txt.gz We need to add bindep.txt, like neutron: https://github.com/openstack/neutron/blob/master/bindep.txt#L5 Co-Authored-By: chenker Change-Id: Ifb2d2bb3a1043ab1a4c94d30029bb920b4627a31 --- bindep.txt | 5 +++++ senlinclient/tests/unit/test_format_utils.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 bindep.txt diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..a2011f5f --- /dev/null +++ b/bindep.txt @@ -0,0 +1,5 @@ +# This file contains runtime (non-python) dependencies +# More info at: http://docs.openstack.org/infra/bindep/readme.html + +# tools/misc-sanity-checks.sh validates .po[t] files +gettext [test] diff --git a/senlinclient/tests/unit/test_format_utils.py b/senlinclient/tests/unit/test_format_utils.py index e14e203a..5ff9af4b 100644 --- a/senlinclient/tests/unit/test_format_utils.py +++ b/senlinclient/tests/unit/test_format_utils.py @@ -51,7 +51,8 @@ class TestFormats(utils.TestCommand): self.cmd.run(parsed_args) - self.assertEqual(expected, self.app.stdout.make_string()) + self.assertEqual(jsonutils.loads(expected), + jsonutils.loads(self.app.stdout.make_string())) def test_yaml_format(self): self.cmd = ShowYaml(self.app, None)