Unit test for M115 response parsing
This commit is contained in:
parent
d298c3c672
commit
fa16037e9a
1 changed files with 9 additions and 0 deletions
|
|
@ -237,3 +237,12 @@ class TestCommHelpers(unittest.TestCase):
|
|||
result = canonicalize_temperatures(parsed, current)
|
||||
self.assertDictEqual(expected, result)
|
||||
|
||||
@data(
|
||||
("KEY1:Value 1 FIRMWARE_NAME:Some Firmware With Spaces KEY2:Value 2",
|
||||
dict(KEY1="Value 1", KEY2="Value 2", FIRMWARE_NAME="Some Firmware With Spaces"))
|
||||
)
|
||||
@unpack
|
||||
def test_parse_firmware_line(self, line, expected):
|
||||
from octoprint.util.comm import parse_firmware_line
|
||||
result = parse_firmware_line(line)
|
||||
self.assertDictEqual(expected, result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue