Skip to content

Commit ee0a7f0

Browse files
committed
Merge pull request #73 from ARMmbed/issue_70
Add unit tests for NUCLEO L031K6 mbed.htm entry
2 parents f776e08 + 9d214a5 commit ee0a7f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/mbed_htm.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class ParseMbedHTMTestCase(unittest.TestCase):
3434
test_mbed_htm_k64f_url_str = '<meta http-equiv="refresh" content="0; url=http://mbed.org/device/?code=02400203D94B0E7724B7F3CF"/>'
3535
test_mbed_htm_l152re_url_str = '<meta http-equiv="refresh" content="0; url=http://mbed.org/device/?code=07100200656A9A955A0F0CB8"/>'
3636
test_mbed_htm_lpc1768_url_str = '<meta http-equiv="refresh" content="0; url=http://mbed.org/start?auth=101000000000000000000002F7F1869557200730298d254d3ff3509e3fe4722d&loader=11972&firmware=16457&configuration=4" />'
37+
test_mbed_htm_nucleo_l031k6_str = '<meta http-equiv="refresh" content="0; url=http://mbed.org/device/?code=07900221461663077952F5AA"/>'
3738

3839
# DAPLink 0240
3940
test_daplink_240_mbed_html_str = 'window.location.replace("https://mbed.org/device/?code=0240000029164e45002f0012706e0006f301000097969900?version=0240?target_id=0007ffffffffffff4e45315450090023");'
@@ -56,6 +57,10 @@ def test_mbed_htm_lpc1768_url(self):
5657
target_id = self.mbeds.scan_html_line_for_target_id(self.test_mbed_htm_lpc1768_url_str)
5758
self.assertEqual('101000000000000000000002F7F1869557200730298d254d3ff3509e3fe4722d', target_id)
5859

60+
def test_daplink_nucleo_l031k6_url(self):
61+
target_id = self.mbeds.scan_html_line_for_target_id(self.test_mbed_htm_nucleo_l031k6_str)
62+
self.assertEqual('07900221461663077952F5AA', target_id)
63+
5964
def test_daplink_240_mbed_html(self):
6065
target_id = self.mbeds.scan_html_line_for_target_id(self.test_daplink_240_mbed_html_str)
6166
self.assertEqual('0240000029164e45002f0012706e0006f301000097969900', target_id)

0 commit comments

Comments
 (0)