Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-30 17:53:50 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-30 17:53:50 (GMT)
commitc4162507f92e7c0e315db2f6fcef65d6aefd54cf (patch)
tree494f63643d33ed8cc712e3dfe8cb2828e6aeb5e2 /tests
parent3359e001ff406a8fa98233347c3144584096a926 (diff)
Mock and check architecture in the tests
Diffstat (limited to 'tests')
-rw-r--r--tests/devbot/test_config.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/devbot/test_config.py b/tests/devbot/test_config.py
index 39b3f65..dcb5511 100644
--- a/tests/devbot/test_config.py
+++ b/tests/devbot/test_config.py
@@ -32,6 +32,11 @@ class TestConfig(unittest.TestCase):
info_class._OS_RELEASE_PATH = \
os.path.join(data_dir, "os-release-ubuntu-12.10")
+ def _get_architecture(self):
+ return "x86_64"
+
+ info_class._get_architecture = _get_architecture
+
for info_class in distro._supported_distros:
info = info_class()
if info.name == name and info.version == version:
@@ -39,6 +44,8 @@ class TestConfig(unittest.TestCase):
distro._distro_info = None
break
+ self._check_distro_info()
+
def _unset_distro(self):
distro._supported_distros = self._orig
@@ -55,6 +62,11 @@ class TestConfig(unittest.TestCase):
def _assert_no_module(self, modules, name):
self.assertIsNone(self._find_module(modules, name))
+ def _check_distro_info(self):
+ distro_info = distro.get_distro_info()
+ self.assertTrue(distro_info.supported)
+ self.assertTrue(distro_info.valid)
+
def test_fedora_17_modules(self):
self._set_distro("fedora", "17")