unittests: switch TestCase over to lib.commandline

We can take over the parseArgs member and handle parsing of the command
line directly.  This means no more need for ad-hoc parsing and easier to
add new flags.

We have to change how the level= parameter is interpreted.  In the past,
it was a logging level constant, but lib.commandline wants a string for
the level instead.

BUG=None
TEST=`./lib/cache_unittest` still works
TEST=`./lib/cache_unittest CacheReferenceTest` still works
TEST=`./lib/cache_unittest CacheReferenceTest.testAssign` still works
TEST=`./lib/cache_unittest -v` still works
TEST=`./lib/cache_unittest --network` still works

Change-Id: I16cc5d38f9c15e26c2d8ce7cd8913057df0944e6
Reviewed-on: https://chromium-review.googlesource.com/242280
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/pushimage_unittest.py b/scripts/pushimage_unittest.py
index e7fb761..d4031c2 100644
--- a/scripts/pushimage_unittest.py
+++ b/scripts/pushimage_unittest.py
@@ -6,7 +6,6 @@
 
 from __future__ import print_function
 
-import logging
 import mock
 import os
 
@@ -234,4 +233,4 @@
   signing.INPUT_INSN_DIR = signing.TEST_INPUT_INSN_DIR
 
   # Run the tests.
-  cros_test_lib.main(level=logging.INFO, module=__name__)
+  cros_test_lib.main(level='info', module=__name__)