From 4399abe9ea32f474b791f4847317bc45e9c613eb Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 13 Dec 2016 22:06:40 +0100 Subject: [plugins] let all copy_spec tests use add_copy_spec() instead of add_copy_spec_limit() Signed-off-by: Michael Adam --- tests/plugin_tests.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py index ee16af78..6adffdeb 100644 --- a/tests/plugin_tests.py +++ b/tests/plugin_tests.py @@ -254,17 +254,17 @@ class AddCopySpecTests(unittest.TestCase): # add_copy_spec_limit() def test_single_file_no_limit(self): - self.mp.add_copy_spec_limit("tests/tail_test.txt") + self.mp.add_copy_spec("tests/tail_test.txt") self.assert_expect_paths() def test_single_file_under_limit(self): - self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) + self.mp.add_copy_spec("tests/tail_test.txt", 1) self.assert_expect_paths() def test_single_file_over_limit(self): self.mp.sysroot = '/' fn = create_file(2) # create 2MB file, consider a context manager - self.mp.add_copy_spec_limit(fn, 1) + self.mp.add_copy_spec(fn, 1) content, fname = self.mp.copy_strings[0] self.assertTrue("tailed" in fname) self.assertTrue("tmp" in fname) @@ -274,15 +274,15 @@ class AddCopySpecTests(unittest.TestCase): def test_bad_filename(self): self.mp.sysroot = '/' - self.assertFalse(self.mp.add_copy_spec_limit('', 1)) - self.assertFalse(self.mp.add_copy_spec_limit(None, 1)) + self.assertFalse(self.mp.add_copy_spec('', 1)) + self.assertFalse(self.mp.add_copy_spec(None, 1)) def test_glob_file_limit_no_limit(self): self.mp.sysroot = '/' tmpdir = tempfile.mkdtemp() fn = create_file(2, dir=tmpdir) fn2 = create_file(2, dir=tmpdir) - self.mp.add_copy_spec_limit(tmpdir + "/*") + self.mp.add_copy_spec(tmpdir + "/*") self.assertEquals(len(self.mp.copy_paths), 2) shutil.rmtree(tmpdir) @@ -291,7 +291,7 @@ class AddCopySpecTests(unittest.TestCase): tmpdir = tempfile.mkdtemp() fn = create_file(2, dir=tmpdir) fn2 = create_file(2, dir=tmpdir) - self.mp.add_copy_spec_limit(tmpdir + "/*", 1) + self.mp.add_copy_spec(tmpdir + "/*", 1) self.assertEquals(len(self.mp.copy_strings), 1) content, fname = self.mp.copy_strings[0] self.assertTrue("tailed" in fname) @@ -299,11 +299,11 @@ class AddCopySpecTests(unittest.TestCase): shutil.rmtree(tmpdir) def test_multiple_files_no_limit(self): - self.mp.add_copy_spec_limit(['tests/tail_test.txt', 'tests/test.txt']) + self.mp.add_copy_spec(['tests/tail_test.txt', 'tests/test.txt']) self.assertEquals(len(self.mp.copy_paths), 2) def test_multiple_files_under_limit(self): - self.mp.add_copy_spec_limit(['tests/tail_test.txt', 'tests/test.txt'], 1) + self.mp.add_copy_spec(['tests/tail_test.txt', 'tests/test.txt'], 1) self.assertEquals(len(self.mp.copy_paths), 2) -- cgit