diff options
author | James Falcon <james.falcon@canonical.com> | 2021-12-15 20:16:38 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 19:16:38 -0700 |
commit | bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch) | |
tree | 1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /tests/unittests/test_registry.py | |
parent | 2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff) | |
download | vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.tar.gz vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.zip |
Adopt Black and isort (SC-700) (#1157)
Applied Black and isort, fixed any linting issues, updated tox.ini
and CI.
Diffstat (limited to 'tests/unittests/test_registry.py')
-rw-r--r-- | tests/unittests/test_registry.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/unittests/test_registry.py b/tests/unittests/test_registry.py index 4c7df186..28ee04ec 100644 --- a/tests/unittests/test_registry.py +++ b/tests/unittests/test_registry.py @@ -1,32 +1,33 @@ # This file is part of cloud-init. See LICENSE file for license information. from cloudinit.registry import DictRegistry - -from tests.unittests.helpers import (mock, TestCase) +from tests.unittests.helpers import TestCase, mock class TestDictRegistry(TestCase): - def test_added_item_included_in_output(self): registry = DictRegistry() - item_key, item_to_register = 'test_key', mock.Mock() + item_key, item_to_register = "test_key", mock.Mock() registry.register_item(item_key, item_to_register) - self.assertEqual({item_key: item_to_register}, - registry.registered_items) + self.assertEqual( + {item_key: item_to_register}, registry.registered_items + ) def test_registry_starts_out_empty(self): self.assertEqual({}, DictRegistry().registered_items) def test_modifying_registered_items_isnt_exposed_to_other_callers(self): registry = DictRegistry() - registry.registered_items['test_item'] = mock.Mock() + registry.registered_items["test_item"] = mock.Mock() self.assertEqual({}, registry.registered_items) def test_keys_cannot_be_replaced(self): registry = DictRegistry() - item_key = 'test_key' + item_key = "test_key" registry.register_item(item_key, mock.Mock()) - self.assertRaises(ValueError, - registry.register_item, item_key, mock.Mock()) + self.assertRaises( + ValueError, registry.register_item, item_key, mock.Mock() + ) + # vi: ts=4 expandtab |