Remove /noauth/ usage in CLI.  Extracted the bit of the CLI that generates authorization headers into a function with a site override.

If you have site-specific authorization in place on your Autotest web service, you'll need to write a site-specific function to generate authorization info to continue using the CLI.  I'll send a patch in a week or so to remove the /noauth/ endpoint entirely.

Let me know if you have any questions or feedback, I'm happy to help.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4199 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/cli/cli_mock.py b/cli/cli_mock.py
index e6499e9..d5ee672 100644
--- a/cli/cli_mock.py
+++ b/cli/cli_mock.py
@@ -32,6 +32,11 @@
         self.god.stub_class_method(rpc.afe_comm, 'run')
         self.god.stub_function(sys, 'exit')
 
+        def stub_authorization_headers(*args, **kwargs):
+            return {}
+        self.god.stub_with(rpc, 'authorization_headers',
+                           stub_authorization_headers)
+
 
     def tearDown(self):
         super(cli_unittest, self).tearDown()