Loosen help text test for sonic-yang-mgmt
The help text printed for sonic-yang-mgmt has slight differences depending on the package versions. Loosen this check to only check the options themselves, rather than the surrounding text. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
142e1aee63
commit
c6963406cf
@ -4,12 +4,6 @@ import os
|
|||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
output1="""\
|
output1="""\
|
||||||
Error: Table or all option is required
|
|
||||||
usage: sonic-cfg-help [-h] [-t TABLE] [-f FIELD] [-p PRINT_FORMAT] [-a]
|
|
||||||
|
|
||||||
Description of table name
|
|
||||||
|
|
||||||
optional arguments:
|
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-t TABLE, --table TABLE
|
-t TABLE, --table TABLE
|
||||||
Table name
|
Table name
|
||||||
@ -140,7 +134,7 @@ class TestCfgHelp(TestCase):
|
|||||||
def test_dummy_run(self):
|
def test_dummy_run(self):
|
||||||
argument = []
|
argument = []
|
||||||
output = self.run_script(argument)
|
output = self.run_script(argument)
|
||||||
self.assertEqual(output, output1)
|
self.assertIn(output1, output)
|
||||||
|
|
||||||
def test_single_table(self):
|
def test_single_table(self):
|
||||||
argument = ['-t', 'AUTO_TECHSUPPORT']
|
argument = ['-t', 'AUTO_TECHSUPPORT']
|
||||||
|
Reference in New Issue
Block a user