tests: py: fix NameError exception if bdi cmd is not supported