mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
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>
This commit is contained in:
parent
ac053b1493
commit
2c6cac990e
@ -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"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user