summaryrefslogtreecommitdiff
path: root/tests/unittests/test_event.py
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2021-12-15 20:16:38 -0600
committerGitHub <noreply@github.com>2021-12-15 19:16:38 -0700
commitbae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch)
tree1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /tests/unittests/test_event.py
parent2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff)
downloadvyos-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_event.py')
-rw-r--r--tests/unittests/test_event.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/unittests/test_event.py b/tests/unittests/test_event.py
index 3da4c70c..2ea91bb2 100644
--- a/tests/unittests/test_event.py
+++ b/tests/unittests/test_event.py
@@ -1,26 +1,26 @@
# This file is part of cloud-init. See LICENSE file for license information.
"""Tests related to cloudinit.event module."""
-from cloudinit.event import EventType, EventScope, userdata_to_events
+from cloudinit.event import EventScope, EventType, userdata_to_events
class TestEvent:
def test_userdata_to_events(self):
- userdata = {'network': {'when': ['boot']}}
+ userdata = {"network": {"when": ["boot"]}}
expected = {EventScope.NETWORK: {EventType.BOOT}}
assert expected == userdata_to_events(userdata)
def test_invalid_scope(self, caplog):
- userdata = {'networkasdfasdf': {'when': ['boot']}}
+ userdata = {"networkasdfasdf": {"when": ["boot"]}}
userdata_to_events(userdata)
assert (
"'networkasdfasdf' is not a valid EventScope! Update data "
- "will be ignored for 'networkasdfasdf' scope"
- ) in caplog.text
+ "will be ignored for 'networkasdfasdf' scope" in caplog.text
+ )
def test_invalid_event(self, caplog):
- userdata = {'network': {'when': ['bootasdfasdf']}}
+ userdata = {"network": {"when": ["bootasdfasdf"]}}
userdata_to_events(userdata)
assert (
"'bootasdfasdf' is not a valid EventType! Update data "
- "will be ignored for 'network' scope"
- ) in caplog.text
+ "will be ignored for 'network' scope" in caplog.text
+ )