Пример #1
0
    def path_test(self):
        """Test paths to install classes."""
        # Test the fake factory,
        factory = self._get_fake_factory()
        self.assertEqual(factory.paths, ["/fake/path"])

        # Test the real factory.
        factory = InstallClassFactory()
        # There should be always at least one path.
        self.assertTrue(any(filter(lambda p: p.endswith("/pyanaconda/installclasses"), factory.paths)))
Пример #2
0
 def _get_fake_factory(self):
     """Return the fake factory."""
     factory = InstallClassFactory()
     factory._paths = ["/fake/path"]
     return factory
Пример #3
0
 def _get_fake_factory(self):
     """Return the fake factory."""
     factory = InstallClassFactory()
     factory._paths = ["/fake/path"]
     return factory