aboutsummaryrefslogtreecommitdiffstats
path: root/tests/plugin_tests.py
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-12-13 11:03:50 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 14:12:07 +0100
commit1be8920355f054763540c6f8aa86adabab0963e9 (patch)
treea76a9560d70669174a57fbfc33bdac7a1aad9fe2 /tests/plugin_tests.py
parent0e61e0ce35dede5c92ef3d4de15f4bab2a3382d9 (diff)
downloadsos-1be8920355f054763540c6f8aa86adabab0963e9.tar.gz
[plugins] Add tests for add_copy_spec_limit() with multiple copyspecs
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'tests/plugin_tests.py')
-rw-r--r--tests/plugin_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py
index d3e67b57..ee16af78 100644
--- a/tests/plugin_tests.py
+++ b/tests/plugin_tests.py
@@ -298,6 +298,14 @@ class AddCopySpecTests(unittest.TestCase):
self.assertEquals(1024 * 1024, len(content))
shutil.rmtree(tmpdir)
+ def test_multiple_files_no_limit(self):
+ self.mp.add_copy_spec_limit(['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.assertEquals(len(self.mp.copy_paths), 2)
+
class CheckEnabledTests(unittest.TestCase):