diff --git a/console_conf/controllers/tests/test_chooser.py b/console_conf/controllers/tests/test_chooser.py index 601515f7..acad6db6 100644 --- a/console_conf/controllers/tests/test_chooser.py +++ b/console_conf/controllers/tests/test_chooser.py @@ -140,7 +140,7 @@ class TestChooserController(unittest.TestCase): def test_current_current_all_there_and_back(self, cv, ccsv): app = make_app(model=make_model()) c = RecoveryChooserController(app) - # sanity + # confidence check ccsv.assert_called_with(c, c.model.current, has_more=True) cv.assert_called_with(c, c.model.systems) @@ -183,7 +183,7 @@ class TestChooserController(unittest.TestCase): app = make_app(model=model) c = RecoveryChooserController(app) - # sanity + # confidence check self.assertIsNone(c.model.current) # we get the all-systems view now diff --git a/subiquity/client/client.py b/subiquity/client/client.py index 7f5ac441..1ea27fab 100644 --- a/subiquity/client/client.py +++ b/subiquity/client/client.py @@ -36,7 +36,7 @@ from subiquitycore.view import BaseView from subiquity.client.controller import Confirm from subiquity.client.keycodes import ( - DummyKeycodesFilter, + NoOpKeycodesFilter, KeyCodesFilter, ) from subiquity.common.api.client import make_client_for_conn @@ -125,7 +125,7 @@ class SubiquityClient(TuiApplication): if is_linux_tty(): self.input_filter = KeyCodesFilter() else: - self.input_filter = DummyKeycodesFilter() + self.input_filter = NoOpKeycodesFilter() self.help_menu = HelpMenu(self, about_msg) super().__init__(opts) diff --git a/subiquity/client/keycodes.py b/subiquity/client/keycodes.py index 3f568744..ee7a79fe 100644 --- a/subiquity/client/keycodes.py +++ b/subiquity/client/keycodes.py @@ -94,8 +94,8 @@ class KeyCodesFilter: return keys -class DummyKeycodesFilter: - # A dummy implementation of the same interface as KeyCodesFilter +class NoOpKeycodesFilter: + # A do-nothing implementation of the same interface as KeyCodesFilter # we can use when not running in a linux tty. def enter_keycodes_mode(self): diff --git a/subiquity/models/tests/test_subiquity.py b/subiquity/models/tests/test_subiquity.py index 13a8eab3..7b1fda7a 100644 --- a/subiquity/models/tests/test_subiquity.py +++ b/subiquity/models/tests/test_subiquity.py @@ -209,7 +209,7 @@ class TestSubiquityModel(unittest.IsolatedAsyncioTestCase): def test_cloud_init_user_list_merge(self, run_cmd): main_user = IdentityData( username='mainuser', - crypted_password='dummy_value', + crypted_password='sample_value', hostname='somehost') secondary_user = {'name': 'user2'} diff --git a/subiquity/server/tests/test_controller.py b/subiquity/server/tests/test_controller.py index 76a570b1..0d9684bf 100644 --- a/subiquity/server/tests/test_controller.py +++ b/subiquity/server/tests/test_controller.py @@ -38,21 +38,21 @@ class TestController(SubiTestCase): # Make sure the autoinstall_key has precedence over # autoinstall_key_alias if both are present. self.controller.app.autoinstall_config = { - "dummy": "some-dummy-data", - "dummy-alias": "some-dummy-alias-data", + "sample": "some-sample-data", + "sample-alias": "some-sample-alias-data", } - self.controller.autoinstall_key = "dummy" - self.controller.autoinstall_key_alias = "dummy-alias" + self.controller.autoinstall_key = "sample" + self.controller.autoinstall_key_alias = "sample-alias" self.controller.autoinstall_default = "default-data" self.controller.setup_autoinstall() - mock_load.assert_called_once_with("some-dummy-data") + mock_load.assert_called_once_with("some-sample-data") # Make sure we failover to autoinstall_key_alias if autoinstall_key is # not present mock_load.reset_mock() self.controller.autoinstall_key = "inexistent" self.controller.setup_autoinstall() - mock_load.assert_called_once_with("some-dummy-alias-data") + mock_load.assert_called_once_with("some-sample-alias-data") # Make sure we failover to autoinstall_default otherwise mock_load.reset_mock() diff --git a/subiquity/server/tests/test_runner.py b/subiquity/server/tests/test_runner.py index 2d2b455c..fefd0190 100644 --- a/subiquity/server/tests/test_runner.py +++ b/subiquity/server/tests/test_runner.py @@ -50,7 +50,7 @@ class TestLoggedCommandRunner(SubiTestCase): "PYTHON": "/snap/subiquity/x1/usr/bin/python3.8", "TARGET_MOUNT_POINT": "/target", "SNAP": "/snap/subiquity/x1", - "DUMMY": "should-not-be-exported", + "SAMPLE": "should-not-be-exported", } with patch.dict(os.environ, environ, clear=True): diff --git a/subiquity/tests/api/test_api.py b/subiquity/tests/api/test_api.py index f8ce557b..cd343980 100755 --- a/subiquity/tests/api/test_api.py +++ b/subiquity/tests/api/test_api.py @@ -1260,7 +1260,7 @@ class TestCancel(TestAPI): async def test_cancel_drivers(self): with patch.dict(os.environ, {'SUBIQUITY_DEBUG': 'has-drivers'}): async with start_server('examples/simple.json') as inst: - await inst.post('/source', source_id="dummy", + await inst.post('/source', source_id="placeholder", search_drivers=True) # /drivers?wait=true is expected to block until APT is # configured. diff --git a/subiquity/ui/views/keyboard.py b/subiquity/ui/views/keyboard.py index 73bbf758..5bdac711 100644 --- a/subiquity/ui/views/keyboard.py +++ b/subiquity/ui/views/keyboard.py @@ -352,8 +352,8 @@ class KeyboardForm(Form): cancel_label = _("Back") - layout = ChoiceField(_("Layout:"), choices=["dummy"]) - variant = ChoiceField(_("Variant:"), choices=["dummy"]) + layout = ChoiceField(_("Layout:"), choices=["placeholder"]) + variant = ChoiceField(_("Variant:"), choices=["placeholder"]) class KeyboardView(BaseView): diff --git a/subiquitycore/tests/test_lsb_release.py b/subiquitycore/tests/test_lsb_release.py index f49983f8..933c37e1 100644 --- a/subiquitycore/tests/test_lsb_release.py +++ b/subiquitycore/tests/test_lsb_release.py @@ -32,8 +32,8 @@ DISTRIB_DESCRIPTION="Ubuntu 21.10" """ with patch(self.target, mock_open(read_data=lsb_str)) as patched: - distro = lsb_release(path="dummy") - patched.assert_called_once_with("dummy", "r") + distro = lsb_release(path="sample") + patched.assert_called_once_with("sample", "r") self.assertEqual(distro["id"], "Ubuntu") self.assertEqual(distro["release"], "21.10") self.assertEqual(distro["codename"], "impish") @@ -55,4 +55,4 @@ DISTRIB_DESCRIPTION="Ubuntu 21.10" def test_lsb_release_mutually_exclusive(self): with self.assertRaises(ValueError): - lsb_release(path="dummy", dry_run=True) + lsb_release(path="sample", dry_run=True) diff --git a/subiquitycore/ui/tests/test_form.py b/subiquitycore/ui/tests/test_form.py index 82f91202..081ed113 100644 --- a/subiquitycore/ui/tests/test_form.py +++ b/subiquitycore/ui/tests/test_form.py @@ -29,11 +29,11 @@ class TestForm(TestCase): """ Make sure Form.has_validation_form() returns: * True if any field is in error * False otherwise. """ - class DummyForm(Form): - field1 = StringField("DummyStringOne", help="") - field2 = StringField("DummyStringTwo", help="") + class SampleForm(Form): + field1 = StringField("FieldOne", help="") + field2 = StringField("FieldTwo", help="") - form = DummyForm() + form = SampleForm() form.field1.in_error = False form.field2.in_error = False @@ -50,15 +50,15 @@ class TestForm(TestCase): def test_has_validation_error_with_subform(self): """ Make sure Form.has_validation_form() is affected by fields from child forms (only if the child form is enabled). """ - class DummySubForm(SubForm): - field1 = StringField("DummyString", help="") + class SampleSubForm(SubForm): + field1 = StringField("FieldString", help="") - class DummyForm(Form): - field1 = StringField("DummyString", help="") - dummy_subform = SubFormField(DummySubForm, "", help="") + class SampleForm(Form): + field1 = StringField("FieldString", help="") + sample_subform = SubFormField(SampleSubForm, "", help="") - form = DummyForm() - subform = form.dummy_subform.widget.form + form = SampleForm() + subform = form.sample_subform.widget.form form.field1.in_error = False subform.field1.in_error = False @@ -79,46 +79,46 @@ class TestForm(TestCase): # Make sure fields in disabled subforms are ignored. form.field1.in_error = False subform.field1.in_error = True - form.dummy_subform.enabled = False + form.sample_subform.enabled = False self.assertFalse(form.has_validation_error()) def test_has_validation_error_with_subsubform(self): """ Make sure enabling/disabling parent forms also acts as if sub forms are disabled. """ - class DummySubSubForm(SubForm): - field1 = StringField("DummyString", help="") + class SampleSubSubForm(SubForm): + field1 = StringField("SampleString", help="") - class DummySubForm(SubForm): - dummy_subform = SubFormField(DummySubSubForm, "", help="") + class SampleSubForm(SubForm): + sample_subform = SubFormField(SampleSubSubForm, "", help="") - class DummyForm(Form): - dummy_subform = SubFormField(DummySubForm, "", help="") + class SampleForm(Form): + sample_subform = SubFormField(SampleSubForm, "", help="") - form = DummyForm() - subform = form.dummy_subform.widget.form - subsubform = subform.dummy_subform.widget.form + form = SampleForm() + subform = form.sample_subform.widget.form + subsubform = subform.sample_subform.widget.form subsubform.field1.in_error = True self.assertTrue(form.has_validation_error()) # If subsubform is disabled, it should be ignored. subsubform.field1.in_error = True - subform.dummy_subform.enabled = False + subform.sample_subform.enabled = False self.assertFalse(form.has_validation_error()) # If subform is disabled, it should also be ignored. subsubform.field1.in_error = True - subform.dummy_subform.enabled = True - form.dummy_subform.enabled = False + subform.sample_subform.enabled = True + form.sample_subform.enabled = False self.assertFalse(form.has_validation_error()) def test_done_button_auto_toggle(self): """ Make sure calling validated() enables or disables the Done button. """ - class DummyForm(Form): - field1 = StringField("DummyString", help="") + class SampleForm(Form): + field1 = StringField("SampleString", help="") - form = DummyForm() + form = SampleForm() done_button = form.buttons.base_widget.contents[0][0] form.field1.in_error = False @@ -132,14 +132,14 @@ class TestForm(TestCase): def test_subform_validated_propagates(self): """ Make sure calling validated() in a subform affects the Done button in the parent form. """ - class DummySubForm(SubForm): - field1 = StringField("DummyString", help="") + class SampleSubForm(SubForm): + field1 = StringField("SampleString", help="") - class DummyForm(Form): - dummy_subform = SubFormField(DummySubForm, "", help="") + class SampleForm(Form): + sample_subform = SubFormField(SampleSubForm, "", help="") - form = DummyForm() - subform = form.dummy_subform.widget.form + form = SampleForm() + subform = form.sample_subform.widget.form done_button = form.buttons.base_widget.contents[0][0] subform.field1.in_error = False