예제 #1
0
    def test_install(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(plugin=self.plugins['plugin'])

        # check the plugin was installed
        from mock_for_test import module as m
        print m.var
예제 #2
0
    def test_extract_module_paths(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(self.plugins['plugin'])

        paths = extract_module_paths("mock-plugin")

        assert "mock_for_test.module" in paths
예제 #3
0
    def test_install(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(plugin=self.plugins['plugin'])

        # check the plugin was installed
        from mock_for_test import module as m
        print m.var
예제 #4
0
    def test_extract_module_paths(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(self.plugins['plugin'])

        paths = extract_module_paths("mock-plugin")

        assert "mock_for_test.module" in paths
예제 #5
0
    def test_install_with_dependencies(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(plugin=self.plugins['plugin_with_dependencies'])

        # check the plugin was installed
        from mock_with_dependencies_for_test import module as m
        print m.var

        # check the dependency was installed
        from python_webserver_installer import tasks as t
        t.get_webserver_root
예제 #6
0
    def test_install_with_dependencies(self):

        temp_folder = self.create_temp_folder()

        os.environ[CELERY_WORK_DIR_PATH_KEY] = temp_folder

        install_celery_plugin(plugin=self.plugins['plugin_with_dependencies'])

        # check the plugin was installed
        from mock_with_dependencies_for_test import module as m
        print m.var

        # check the dependency was installed
        from python_webserver_installer import tasks as t
        t.get_webserver_root