Fix nodes assignment and script for cli tests running

* fix wrong assignment api format
* fix test script to exit with non-zero status
  in case of failed nosetests

Change-Id: I711242db79868b3d8fc2c0a8f8e61c514811a251
Closes-bug: #1282478