summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-24 22:18:27 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-24 22:18:27 +0100
commitd958f4b3912dc298037c112ad724b85a7a46ecdb (patch)
tree66eef13ebc660211a2e7d3f37b34e04db1fb25a9 /source4/scripting/python/samba/tests
parent859b847a68cf10526b9f356ebcb328e7334a8cb1 (diff)
downloadsamba-d958f4b3912dc298037c112ad724b85a7a46ecdb.tar.gz
samba-d958f4b3912dc298037c112ad724b85a7a46ecdb.tar.xz
samba-d958f4b3912dc298037c112ad724b85a7a46ecdb.zip
python: Add function to look for unsubsituted variables.
(This used to be commit e726ce5bc515ae8d10b472396e228cfd35737476)
Diffstat (limited to 'source4/scripting/python/samba/tests')
-rw-r--r--source4/scripting/python/samba/tests/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py
index ad8a2524b5..6fbf420339 100644
--- a/source4/scripting/python/samba/tests/__init__.py
+++ b/source4/scripting/python/samba/tests/__init__.py
@@ -67,6 +67,10 @@ class SubstituteVarTestCase(unittest.TestCase):
def test_unknown_var(self):
self.assertEquals("foo ${bla} gsff",
samba.substitute_var("foo ${bla} gsff", {"bar": "bla"}))
+
+ def test_check_all_substituted(self):
+ check_all_substituted("nothing to see here")
+ self.assertRaises(Exception, check_all_substituted, "Not subsituted: ${FOOBAR}")
class LdbExtensionTests(TestCaseInTempDir):