Updated Branches: refs/heads/trunk 6f644ea59 -> d2bd5dc52
AMBARI-2925. Ambari Agent unit tests failing with Test Check Web UI is failing. (smohanty) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/d2bd5dc5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/d2bd5dc5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/d2bd5dc5 Branch: refs/heads/trunk Commit: d2bd5dc52e7704a5a63f30d16b6e2a7d93dc4435 Parents: 6f644ea Author: Sumit Mohanty <[email protected]> Authored: Thu Aug 15 17:07:19 2013 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Thu Aug 15 17:07:25 2013 -0700 ---------------------------------------------------------------------- ambari-agent/src/test/python/TestCheckWebUI.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d2bd5dc5/ambari-agent/src/test/python/TestCheckWebUI.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/TestCheckWebUI.py b/ambari-agent/src/test/python/TestCheckWebUI.py index c8d6b18..ea45400 100644 --- a/ambari-agent/src/test/python/TestCheckWebUI.py +++ b/ambari-agent/src/test/python/TestCheckWebUI.py @@ -62,6 +62,10 @@ class TestMain(unittest.TestCase): urlopen_mock.return_value = get_code_mock parse_args_mock.return_value = (options, MagicMock) - with self.assertRaises(SystemExit) as e: + try: checkWebUI.main() - self.assertEqual(e.exception.code, 1) + except SystemExit, e: + self.assertEqual(e.code, 1) + +if __name__ == "__main__": + unittest.main()
