Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self):
self.spec = Spec()
self.spec.Name = "mock"
self.spec.Version = "1.0"
self.spec.Release = "1%{?dist}"
self.spec.Summary = "Hello World test program"
self.spec.License = "GPLv2"
self.spec.Source = "mock-1.0.tar.gz"
self.spec.description = "Hello World C project for testing RPG."
self.spec.prep = r'%autosetup'
self.spec.build = "make"
self.sack = self.load_dnf_sack()
self._package_builder = PackageBuilder()
self.conf = FakeConf()
self.load_plugins()
def assertZipEqualDir(self, z, d):
def _get_zip_files(t):
with zipfile.ZipFile(str(t)) as zip:
return set(zip.namelist())
def _get_dir_files(d):
return set([str(f.relative_to(d)) + "/"
if f.is_dir() else str(f.relative_to(d))
for f in d.glob("**/*")])
self.assertEqual(_get_zip_files(Path(z)), _get_dir_files(Path(d)))
class PluginTestCase(RpgTestCase):
sack = mock.MagicMock()
spec = Spec()
def setUp(self):
self.spec = Spec()
def setUp(self):
self.maxDiff = None
self.spec = Spec()
self.sack = None
self.temp_dir = Path(tempfile.mkdtemp())
def __init__(self):
self._package_builder = PackageBuilder()
self.spec = Spec()
self.spec.Name = "hello"
self.spec.Version = "1.4"
self.spec.Release = "1%{?dist}"
self.spec.Summary = "Hello World test program"
self.spec.License = "GPLv2"
self.spec.Source = "hello-1.4.tar.gz"
self.spec.description = "Hello World C project for testing RPG."
self.spec.prep = r'%autosetup'
self.spec.build = "make"
self.spec.install = r"make install DESTDIR=%{RPM_BUILD_ROOT}"
def __init__(self):
self.conf = Conf()
self._setup_logging()
self._project_builder = ProjectBuilder()
self.spec = Spec()
self.sack = None
self._package_builder = PackageBuilder()