← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/testfix-preload-publisher-indexes into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/testfix-preload-publisher-indexes into lp:launchpad.

Commit message:
Fix test fallout from SPR.addFile/SPR.files changes.

Requested reviews:
  Colin Watson (cjwatson)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/testfix-preload-publisher-indexes/+merge/222858

Test fixes following https://code.launchpad.net/~cjwatson/launchpad/preload-publisher-indexes/+merge/222768.
-- 
https://code.launchpad.net/~cjwatson/launchpad/testfix-preload-publisher-indexes/+merge/222858
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/archiveuploader/tests/test_ppauploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_ppauploadprocessor.py	2013-03-20 00:26:10 +0000
+++ lib/lp/archiveuploader/tests/test_ppauploadprocessor.py	2014-06-11 18:31:26 +0000
@@ -1144,7 +1144,7 @@
 
         self.assertEqual(queue_item.status, PackageUploadStatus.DONE)
         self.assertEqual(
-            queue_item.sources[0].sourcepackagerelease.files.count(), 5)
+            len(queue_item.sources[0].sourcepackagerelease.files), 5)
 
 
 class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):

=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py	2014-06-11 15:39:51 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py	2014-06-11 18:31:26 +0000
@@ -247,7 +247,6 @@
             filetype = determine_source_file_type(file.filename)
         sprf = SourcePackageReleaseFile(
             sourcepackagerelease=self, filetype=filetype, libraryfile=file)
-        Store.of(self).flush()
         del get_property_cache(self).files
         return sprf
 


References