Set the AT_SPI_CLIENT variable in the tests

This ensures the test itself is not recognized as a client
by the registry. I'm not sure how that happens since we are
not loading gtk, but it does. Not being a real gtk client with
a mainloop we wasn't answering dbus calls and causing the registry
to hang and fail.
This commit is contained in:
Daniel Narvaez 2013-06-15 23:51:31 +02:00
parent 8c0f4c025c
commit 5bef5a82d2

View File

@ -35,10 +35,14 @@ class UITestCase(unittest.TestCase):
self._orig_level = logger.getEffectiveLevel() self._orig_level = logger.getEffectiveLevel()
logger.setLevel(logging.DEBUG) logger.setLevel(logging.DEBUG)
os.environ["AT_SPI_CLIENT"] = "yes"
def tearDown(self): def tearDown(self):
logger = logging.getLogger() logger = logging.getLogger()
logger.setLevel(self._orig_level) logger.setLevel(self._orig_level)
del os.environ["AT_SPI_CLIENT"]
@contextmanager @contextmanager
def run_view(self, name): def run_view(self, name):
view_path = os.path.join("views", "%s.py" % name) view_path = os.path.join("views", "%s.py" % name)