From d19ac62be99873c81e13f32ba9a73b92c7287d5a Mon Sep 17 00:00:00 2001 From: Michael Wiegand Date: Fri, 2 Nov 2018 14:25:13 +0100 Subject: [PATCH] Add test for set_attributes This commit adds a test for the last remaining untested method of the `XmlCommandElement` class, `set_attributes`. --- tests/xml/test_xml_command.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/xml/test_xml_command.py b/tests/xml/test_xml_command.py index 2e46a13c3..a1064324a 100644 --- a/tests/xml/test_xml_command.py +++ b/tests/xml/test_xml_command.py @@ -46,6 +46,12 @@ def test_should_allow_to_set_attribute(self): self.assertEqual(cmd.to_string(), '') + def test_should_allow_to_set_attributes(self): + cmd = XmlCommand('foo') + cmd.set_attributes({'bar': '1', 'baz': '2'}) + + self.assertEqual(cmd.to_string(), '') + def test_should_convert_to_string(self): cmd = XmlCommand('foo')