From e17e41dcff096ead7e129a0db063f75de44aaa2b Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 20 Feb 2013 08:45:44 -0500 Subject: fixed unit tests using long ints for py3k --- testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'testsuite') diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py index 355fec494..19f76f2f1 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/Test_init.py @@ -1,9 +1,8 @@ import os import sys -import copy import lxml.etree -import subprocess from mock import Mock, MagicMock, patch +from Bcfg2.Compat import long from Bcfg2.Client.Tools import Tool, SvcTool, PkgTool, \ ToolInstantiationError @@ -82,16 +81,18 @@ class TestTool(Bcfg2TestCase): @patch("os.stat") def inner(mock_stat): - mock_stat.return_value = (33261, 2245040, 64770L, 1, 0, 0, 25552, - 1360831382, 1352194410, 1354626626) + mock_stat.return_value = (33261, 2245040, long(64770), 1, 0, 0, + 25552, 1360831382, 1352194410, + 1354626626) t._check_execs() self.assertItemsEqual(mock_stat.call_args_list, [call(e) for e in t.__execs__]) # not executable mock_stat.reset_mock() - mock_stat.return_value = (33188, 2245040, 64770L, 1, 0, 0, 25552, - 1360831382, 1352194410, 1354626626) + mock_stat.return_value = (33188, 2245040, long(64770), 1, 0, 0, + 25552, 1360831382, 1352194410, + 1354626626) self.assertRaises(ToolInstantiationError, t._check_execs) # non-existant -- cgit v1.2.3-1-g7c22