console_conf: fix not_called usage

This commit is contained in:
Dan Bungert 2024-02-26 17:05:37 -07:00
parent d266ac6a3f
commit 76c9b6607a
1 changed files with 3 additions and 2 deletions

View File

@ -148,9 +148,10 @@ class TestChooserController(unittest.TestCase):
# go back now # go back now
c.back() c.back()
c.ui.set_body.assert_called_with("current") c.ui.set_body.assert_called_with("current")
c.ui.set_body.reset_mock()
# nothing # nothing
c.back() c.back()
c.ui.set_body.not_called() c.ui.set_body.assert_not_called()
@mock.patch( @mock.patch(
"console_conf.controllers.chooser.ChooserCurrentSystemView", "console_conf.controllers.chooser.ChooserCurrentSystemView",
@ -169,7 +170,7 @@ class TestChooserController(unittest.TestCase):
self.assertEqual(v, "current") self.assertEqual(v, "current")
# going back does nothing # going back does nothing
c.back() c.back()
c.ui.set_body.not_called() c.ui.set_body.assert_not_called()
@mock.patch( @mock.patch(
"console_conf.controllers.chooser.ChooserCurrentSystemView", "console_conf.controllers.chooser.ChooserCurrentSystemView",