Index: dialin/squish/unittests.py =================================================================== diff -u -re9104e0b4a45a64840a7cb66a115839698129844 -r5bdaabbf259b9ceca0377a5d4a5030ee2e59c264 --- dialin/squish/unittests.py (.../unittests.py) (revision e9104e0b4a45a64840a7cb66a115839698129844) +++ dialin/squish/unittests.py (.../unittests.py) (revision 5bdaabbf259b9ceca0377a5d4a5030ee2e59c264) @@ -27,6 +27,7 @@ # import test import sys +from subprocess import check_output import names if names.DIALIN_LINK: @@ -70,3 +71,17 @@ test.compare(crc.calcCRC8(strByte2, ' '), '55') test.compare(crc.calcCRC8(strByte3, ' '), '4F') test.compare(crc.calcCRC8(strByte4, ' '), '7F') + +def test_can0(): + canid = "can0" + ipa = "ip a" + ipa = check_output(ipa, shell=True) + loc = str(ipa).find(canid) + fnd = loc >= 0 + if (fnd): + msg = "can device '{}' found".format(canid) + else: + msg = "No can device registered as '{}'".format(canid) + test.compare(loc >= 0, True, msg) + + \ No newline at end of file