def test_positive_remove_package(self): """Remove package from content host remotely @Feature: Content Host - Package @Assert: Package was successfully removed """ self.client.download_install_rpm(FAKE_0_YUM_REPO, FAKE_0_CUSTOM_PACKAGE) ContentHost.package_remove( { u"content-host": self.client.hostname, u"organization-id": KatelloAgentTestCase.org["id"], u"packages": FAKE_0_CUSTOM_PACKAGE_NAME, } ) result = self.client.run("rpm -q {0}".format(FAKE_0_CUSTOM_PACKAGE_NAME)) self.assertNotEqual(result.return_code, 0)
def test_contenthost_package_remove(self): """@Test: Remove package from content host remotely @Feature: Content Host - Package @Assert: Package was successfully removed """ self.vm.download_install_rpm(FAKE_0_YUM_REPO, FAKE_0_CUSTOM_PACKAGE) result = ContentHost.package_remove({ u'organization-id': TestCHKatelloAgent.org['id'], u'content-host': self.vm.hostname, u'packages': FAKE_0_CUSTOM_PACKAGE_NAME, }) self.assertEqual(result.return_code, 0) result = self.vm.run('rpm -q {}'.format(FAKE_0_CUSTOM_PACKAGE_NAME)) self.assertNotEqual(result.return_code, 0)