Description: Fix LP: #1483410
 This patch corrects a simple bug in the test suite loader that was previously
 silently compesated by eariler versions of the standard library. The bug has
 caused us to effectively import modules and pacakges from _inside_ the
 checkbox-old/checkbox package. For example, the module 'checkbox-old/checkbox.dbus'
 was imported simply as 'dbus'. This caused all kinds of understandable havoc.
 The fix relies on the second, optional argument to defaultTestLoader.discover()
 which lets us specify that we want to load 'checkbox-old/checkbox' from the parent
 directory.
Author: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Origin: upstream
Bug-Ubuntu: https://launchpad.net/bugs/1483410
Forwarded: no
Last-Update: 2015-08011

--- checkbox-0.18.orig/checkbox-old/checkbox/tests/__init__.py
+++ checkbox-0.18/checkbox-old/checkbox/tests/__init__.py
@@ -35,8 +35,9 @@ def load_unit_tests():
     """
     # Discover all unit tests. By simple convention those are kept in
     # python modules that start with the word 'test_' .
-    return defaultTestLoader.discover(
-        os.path.dirname(getabsfile(checkbox)))
+    start_dir = os.path.dirname(getabsfile(checkbox))
+    top_level_dir = os.path.normpath(os.path.join(start_dir, '..'))
+    return defaultTestLoader.discover(start_dir, top_level_dir=top_level_dir)
 
 
 def test_suite():
