~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/browser/tests/test_queue.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-25 08:55:37 UTC
  • mfrom: (13287.1.8 bug-800652)
  • Revision ID: launchpad@pqm.canonical.com-20110625085537-moikyoo2pe98zs7r
[r=jcsackett, julian-edwards][bug=800634,
        800652] Enable and display overrides on sync package uploads.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
            package_sets.values()[0][0].name,
273
273
            complete_upload.display_package_sets)
274
274
 
275
 
    def test_display_package_sets_returns_empty_for_non_source_upload(self):
 
275
    def test_display_package_sets_returns_empty_for_other_upload(self):
276
276
        upload = self.factory.makeBuildPackageUpload()
277
277
        complete_upload = self.makeCompletePackageUpload(
278
278
            upload, package_sets=self.mapPackageSets(upload))
287
287
        self.assertEqual("aaa bbb ccc", complete_upload.display_package_sets)
288
288
 
289
289
    def test_display_component_returns_source_upload_component_name(self):
290
 
        complete_upload = self.makeCompletePackageUpload()
291
 
        self.assertEqual(
292
 
            complete_upload.sourcepackagerelease.component.name.lower(),
293
 
            complete_upload.display_component)
294
 
 
295
 
    def test_display_component_returns_empty_for_non_source_upload(self):
 
290
        upload = self.factory.makeSourcePackageUpload()
 
291
        complete_upload = self.makeCompletePackageUpload(upload)
 
292
        self.assertEqual(
 
293
            upload.sourcepackagerelease.component.name.lower(),
 
294
            complete_upload.display_component)
 
295
 
 
296
    def test_display_component_returns_copy_job_upload_component_name(self):
 
297
        copy_job_upload = self.factory.makeCopyJobPackageUpload()
 
298
        complete_upload = self.makeCompletePackageUpload(copy_job_upload)
 
299
        self.assertEqual(
 
300
            copy_job_upload.component_name.lower(),
 
301
            complete_upload.display_component)
 
302
 
 
303
    def test_display_component_returns_empty_for_other_upload(self):
296
304
        complete_upload = self.makeCompletePackageUpload(
297
305
            self.factory.makeBuildPackageUpload())
298
306
        self.assertEqual('', complete_upload.display_component)
299
307
 
300
308
    def test_display_section_returns_source_upload_section_name(self):
301
 
        complete_upload = self.makeCompletePackageUpload()
302
 
        self.assertEqual(
303
 
            complete_upload.sourcepackagerelease.section.name.lower(),
304
 
            complete_upload.display_section)
305
 
 
306
 
    def test_display_section_returns_empty_for_non_source_upload(self):
 
309
        upload = self.factory.makeSourcePackageUpload()
 
310
        complete_upload = self.makeCompletePackageUpload(upload)
 
311
        self.assertEqual(
 
312
            upload.sourcepackagerelease.section.name.lower(),
 
313
            complete_upload.display_section)
 
314
 
 
315
    def test_display_section_returns_copy_job_upload_section_name(self):
 
316
        copy_job_upload = self.factory.makeCopyJobPackageUpload()
 
317
        complete_upload = self.makeCompletePackageUpload(copy_job_upload)
 
318
        self.assertEqual(
 
319
            copy_job_upload.section_name.lower(),
 
320
            complete_upload.display_section)
 
321
 
 
322
    def test_display_section_returns_empty_for_other_upload(self):
307
323
        complete_upload = self.makeCompletePackageUpload(
308
324
            self.factory.makeBuildPackageUpload())
309
325
        self.assertEqual('', complete_upload.display_section)
310
326
 
311
327
    def test_display_priority_returns_source_upload_priority(self):
312
 
        complete_upload = self.makeCompletePackageUpload()
 
328
        upload = self.factory.makeSourcePackageUpload()
 
329
        complete_upload = self.makeCompletePackageUpload(upload)
313
330
        self.assertEqual(
314
 
            complete_upload.sourcepackagerelease.urgency.name.lower(),
 
331
            upload.sourcepackagerelease.urgency.name.lower(),
315
332
            complete_upload.display_priority)
316
333
 
317
 
    def test_display_priority_returns_empty_for_non_source_upload(self):
 
334
    def test_display_priority_returns_empty_for_other_upload(self):
318
335
        complete_upload = self.makeCompletePackageUpload(
319
336
            self.factory.makeBuildPackageUpload())
320
337
        self.assertEqual('', complete_upload.display_priority)