Fix mock restoration in git_cl_test

The assertion in TestGitCl.tearDown should be done after super.tearDown
is finished. Otherwise if the assertion fails, mocked objects won't be
restored properly, and the next TestCase would be affected.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295049 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index ed1d7a5..c1eebeb 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -100,9 +100,11 @@
     git_cl.settings = None
 
   def tearDown(self):
-    if not self.has_failed():
-      self.assertEquals([], self.calls)
-    super(TestGitCl, self).tearDown()
+    try:
+      if not self.has_failed():
+        self.assertEquals([], self.calls)
+    finally:
+      super(TestGitCl, self).tearDown()
 
   def _mocked_call(self, *args, **_kwargs):
     self.assertTrue(