Merged 2 tests dependent on each other

One created metadata, the other deleted them. They would fail if they would get
ran in a different order or individually.

I also refactored them a bit to do this.

Change-Id: I21a8ab9f077e742eb40ea29fcea5e04f9d7dd043
Makes run_tests.sh exit code match the nosetests exit value.

This will simply make the script exit with the same exit value
given by the run_tests function, addressing bug #1185755.

Change-Id: Iac1a37169db4e29d845c77d87a2df1fa07b201e1
Fixes: bug #1185755
Merge "Merged 2 tests dependent on each other"
Merge "Makes run_tests.sh exit code match the nosetests exit value."