aboutsummaryrefslogtreecommitdiffstats
path: root/tests/plugin_tests.py
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-03-27 21:06:24 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-03-27 21:06:24 +0000
commit0bedab23f3eb86878d894419614e1728c395a84e (patch)
tree28438a083a481a2e382af7a2aab032cae8e48356 /tests/plugin_tests.py
parentc613b172a44c98f40919c763eb4bf088476cbefa (diff)
downloadsos-0bedab23f3eb86878d894419614e1728c395a84e.tar.gz
Raise a TypeError if add_copy_specs() is called with a string
Since strings are iterable a plugin attempting to call add_copy_specs("/something") results in a plugin calling add_copy_spec("/"). Raise a TypeError if this happens. Fixes Issue #141. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'tests/plugin_tests.py')
-rw-r--r--tests/plugin_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py
index a4905cf9..c44c1629 100644
--- a/tests/plugin_tests.py
+++ b/tests/plugin_tests.py
@@ -243,6 +243,9 @@ class AddCopySpecTests(unittest.TestCase):
self.mp.add_copy_specs(["tests/tail_test.txt"])
self.assert_expect_paths()
+ def test_add_copy_spec_nostrings(self):
+ self.assertRaises(TypeError, self.mp.add_copy_specs,"stringsarebadmkay?")
+
# add_copy_spec_limit()
def test_single_file_over_limit(self):