Index: quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/base.py
===================================================================
--- quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/base.py	(revision 2534)
+++ quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/base.py	(revision 2535)
@@ -9,4 +9,5 @@
 
 from zope.testing import doctestunit
+from zope.interface import Interface
 from zope.component import testing
 from Testing import ZopeTestCase as ztc
@@ -25,7 +26,12 @@
 from quintagroup.plonegooglesitemaps.config import PROJECTNAME
 from quintagroup.plonegooglesitemaps.config import ping_googlesitemap
+from quintagroup.plonegooglesitemaps.browser import mobilesitemapview
 
 quintagroup.plonegooglesitemaps.config.testing = 1
 quintagroup.plonegooglesitemaps.config.UPDATE_CATALOG = True
+
+
+class IMobileMarker(Interface):
+    """Test Marker interface for mobile objects"""
 
 
@@ -40,4 +46,14 @@
         self.loginAsPortalOwner()
         self.workflow = self.portal.portal_workflow
+        self.orig_mobile_ifaces = None
+
+    def patchMobile(self):
+        # patch mobile sitemap view
+        self.orig_mobile_ifaces = mobilesitemapview.MOBILE_INTERFACES
+        mobilesitemapview.MOBILE_INTERFACES = [IMobileMarker.__identifier__,]
+
+    def beforeTearDown(self):
+        if self.orig_mobile_ifaces is not None:
+            mobilesitemapview.MOBILE_INTERFACES = self.orig_mobile_ifaces
 
 
Index: quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testInstallation.py
===================================================================
--- quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testInstallation.py	(revision 2534)
+++ quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testInstallation.py	(revision 2535)
@@ -58,5 +58,5 @@
 
     def afterSetUp(self):
-        self.loginAsPortalOwner()
+        super(TestGoogleSitemapsUninstallation, self).afterSetUp()
         self.portal.portal_quickinstaller.uninstallProducts(
             products=['quintagroup.plonegooglesitemaps',])
Index: quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testMobileSitemaps.py
===================================================================
--- quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testMobileSitemaps.py	(revision 2534)
+++ quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testMobileSitemaps.py	(revision 2535)
@@ -2,5 +2,5 @@
 from DateTime import DateTime
 
-from zope.interface import Interface, alsoProvides
+from zope.interface import alsoProvides
 from zope.component import queryMultiAdapter
 from zope.component import getSiteManager, getGlobalSiteManager
@@ -13,15 +13,9 @@
 from quintagroup.plonegooglesitemaps.browser.mobilesitemapview import MobileSitemapView
 
-class IMobileMarker(Interface):
-    """Marker interface for mobile objects"""
-
 class TestMobileSitemapsXML(FunctionalTestCase):
 
     def afterSetUp(self):
         super(TestMobileSitemapsXML, self).afterSetUp()
-        # patch mobile sitemap view
-        self.orig_mobile_ifaces = mobilesitemapview.MOBILE_INTERFACES
-        mobilesitemapview.MOBILE_INTERFACES = [IMobileMarker.__identifier__,]
-          # Create mobile sitemaps
+        self.patchMobile()
         _createObjectByType("Sitemap", self.portal, id="mobile-sitemap.xml",
                             sitemapType="mobile", portalTypes=("Document",))
@@ -35,8 +29,4 @@
         self.workflow.doActionFor(self.my_mobile, "publish")
         self.reParse()
-
-    def beforeTearDown(self):
-        mobilesitemapview.MOBILE_INTERFACES = self.orig_mobile_ifaces
-        super(TestMobileSitemapsXML, self).beforeTearDown() 
 
     def reParse(self):
Index: quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testUpgrade.py
===================================================================
--- quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testUpgrade.py	(revision 2534)
+++ quintagroup.plonegooglesitemaps/branches/test_refactoring/quintagroup/plonegooglesitemaps/tests/testUpgrade.py	(revision 2535)
@@ -18,4 +18,5 @@
 
     def afterSetUp(self):
+        super(TestUpgrade, self).afterSetUp()
         self.setup = self.portal.portal_setup
         self.profile = "quintagroup.plonegooglesitemaps:default"
