aboutsummaryrefslogtreecommitdiffstats
path: root/tests/plugin_tests.py
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-12-13 22:06:40 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 14:13:50 +0100
commit4399abe9ea32f474b791f4847317bc45e9c613eb (patch)
tree1fe1ecbdaba9e3a6262c019705ff61e1ee0bfcfb /tests/plugin_tests.py
parentd7c82e130593fbc28d6136a1b057389f2cdcb0fd (diff)
downloadsos-4399abe9ea32f474b791f4847317bc45e9c613eb.tar.gz
[plugins] let all copy_spec tests use add_copy_spec()
instead of add_copy_spec_limit() Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'tests/plugin_tests.py')
-rw-r--r--tests/plugin_tests.py18
1 files 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)