chromium-status: tests: get unittests passing again

The test_update_global_config test started failing due to changes in the
BasePage logic.  Rather than checking the public_access setting in the db
at runtime, it caches it once at startup and then never changes things.
Since the commit that made this change referenced security concerns, I've
left this behavior in there.  Instead, we only do runtime checking when
we are run under the devserver.

It also needed tweaking of the db checks to handle the BasePage bootstrap
logic -- it always initializes a few objects now rather than leaving them
missing.

This behavior also broke the set_global_config, so tweak that too.

Also optimize the runtime python requests -- rather than doing multiple
calls so we can do the assert locally, move the assert to the server and
check the result at the end.  By leveraging self.assertEqual instead of
a plain assert, we also get automatic view of the full server response.

BUG=chromium:314501
TEST=`./tests/main_test.py` all tests pass now

Review URL: https://codereview.chromium.org/57883005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/chromium-status@234183 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed