def testInstallingAndUninstalling(self):
        import ansible_importer
        ansible_importer.install('playbooks')
        self.assertEqual('playbooks', sys.path[-1])
        self.assertEqual(ansible_importer.AnsibleModuleImporter,
                         sys.path_hooks[-1])

        ansible_importer.uninstall('playbooks')
        self.assertFalse('playbooks' in sys.path)
        self.assertFalse(ansible_importer.AnsibleModuleImporter in sys.path_hooks)
Beispiel #2
0
    def testInstallingAndUninstalling(self):
        import ansible_importer
        ansible_importer.install('playbooks')
        self.assertEqual('playbooks', sys.path[-1])
        self.assertEqual(ansible_importer.AnsibleModuleImporter,
                         sys.path_hooks[-1])

        ansible_importer.uninstall('playbooks')
        self.assertFalse('playbooks' in sys.path)
        self.assertFalse(
            ansible_importer.AnsibleModuleImporter in sys.path_hooks)
Beispiel #3
0
 def setUp(self):
     ansible_importer.install(path)