def test_push(self):
     from os import path
     with self.with_new_devlopment_config_file() as configfile:
         config = Configuration.from_disk(configfile)
         worker.init(config)
         src = "incoming/host-power-tools-0.18-windows-x86.msi"
         with patch("infi.execute.execute_assert_success") as execute_assert_success:
             from infi.app_repo import tasks
             tasks.push_package.run(config.remote.fqdn, "user", "password", config.base_directory,
                                    src)
         self.assertTrue(execute_assert_success.called)
         execute_assert_success.assert_called_with(["curl", "-T", path.join(config.base_directory, src),
                                                    "ftp://*****:*****@repo.lab.il.infinidat.com:"])
 def test_pull(self):
     if not environ.get("JENKINS_URL"):
         raise SkipTest("runs on our jenkins only")
     with self.with_new_devlopment_config_file() as configfile:
         cmd = "bin/app_repo -f {} install".format(configfile)
         execute_assert_success(cmd, shell=True)
         execute_assert_success("service app_repo_worker stop", shell=True)
         execute_assert_success("service app_repo_webserver stop", shell=True)
         config = Configuration.from_disk(configfile)
         worker.init(config)
         self.pull_msi(config)
         self.pull_deb(config)
         self.pull_rpm(config)
         before = listdir("data/incoming")
         self.update_metadata(config)
         after = listdir("data/incoming")
         self.assertNotEquals(before, after)