Refactor CLI tests

- tearDown logic was updated. Now we collect all test items and then
delete only them.

Closes-Bug: #1386804

Change-Id: I95193ad89d7db44c100b93cec7bf0c1d3db23209
Merge "Refactor CLI tests"