Example #1
0
    def test_srpms_idempotency(self):
        # Test
        report = UpgradeStepReport()
        units._srpms(self.v1_test_db.database, self.tmp_test_db.database, report)
        result = units._srpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_rpms = self.v1_test_db.database.packages.find({'arch' : 'src'})
        v2_rpms = self.tmp_test_db.database.units_rpm.find()
        self.assertEqual(v1_rpms.count(), v2_rpms.count())

        self._assert_associations(self.tmp_test_db.database.units_srpm, 'srpm', {'arch' : 'src'})
Example #2
0
    def test_srpms(self):
        # Test
        report = UpgradeStepReport()
        result = units._srpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_srpms = self.v1_test_db.database.packages.find({'arch' : 'src'}).sort('filename')
        self._assert_upgrade(v1_srpms)
        self._assert_associations(self.tmp_test_db.database.units_srpm, 'srpm', {'arch' : 'src'})
Example #3
0
    def test_srpms(self):
        # Test
        report = UpgradeStepReport()
        result = units._srpms(self.v1_test_db.database, self.tmp_test_db.database, report)

        # Verify
        self.assertTrue(result)

        v1_srpms = self.v1_test_db.database.packages.find({"arch": "src"}).sort("filename")
        self._assert_upgrade(v1_srpms)
        self._assert_associations(self.tmp_test_db.database.units_srpm, "srpm", {"arch": "src"})