Skip to content

Commit

Permalink
Add unit test for ListTestplan.register_arguments()
Browse files Browse the repository at this point in the history
  • Loading branch information
pieqq committed Mar 11, 2024
1 parent 9c642fa commit c40315e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion checkbox-ng/checkbox_ng/launcher/test_subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ def test_invoke_print_output_customized_format(self, stdout):


class TestListTestplan(TestCase):
maxDiff = None
def setUp(self):
self.launcher = ListTestplan()
self.ctx = Mock()
Expand Down Expand Up @@ -741,6 +740,11 @@ def setUp(self):
),
)

def test_register_arguments(self):
parser_mock = Mock()
self.launcher.register_arguments(parser_mock)
self.assertTrue(parser_mock.add_argument.called)

def test_invoke_test_plan_not_found(self):
self.ctx.args.TEST_PLAN = "test-plan3"

Expand Down

0 comments on commit c40315e

Please sign in to comment.