diff options
| author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-03-09 15:20:53 +1300 |
|---|---|---|
| committer | Douglas Bagnall <dbagnall@samba.org> | 2018-05-05 04:32:42 +0200 |
| commit | 2c6cac990e64983c7fdb5beb3316ef956fa0b0bc (patch) | |
| tree | eac7002995c838d7a5d0a89118982cc2a214f4c4 /python | |
| parent | ac053b1493157c752d7c7c802e95b5222d61b71c (diff) | |
| download | samba-2c6cac990e64983c7fdb5beb3316ef956fa0b0bc.tar.gz samba-2c6cac990e64983c7fdb5beb3316ef956fa0b0bc.tar.bz2 samba-2c6cac990e64983c7fdb5beb3316ef956fa0b0bc.zip | |
sambatool tests: make assertMatch use assertIn
With a note to tidy this up at some point
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/tests/samba_tool/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/samba/tests/samba_tool/base.py b/python/samba/tests/samba_tool/base.py index de257e3db09..89a09225e64 100644 --- a/python/samba/tests/samba_tool/base.py +++ b/python/samba/tests/samba_tool/base.py @@ -96,10 +96,11 @@ class SambaToolCmdTest(samba.tests.BlackboxTestCase): self.assertIsNotNone(val, msg) def assertMatch(self, base, string, msg=None): + # Note: we should stop doing this and just use self.assertIn() if msg is None: msg = "%r is not in %r" % (truncate_string(string), truncate_string(base)) - self.assertTrue(string in base, msg) + self.assertIn(string, base, msg) def randomName(self, count=8): """Create a random name, cap letters and numbers, and always starting with a letter""" |
