~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/jobs/tests/test_ingest.py

  • Committer: Aaron Bentley
  • Date: 2013-07-17 21:55:42 UTC
  • mto: This revision was merged to the branch mainline in revision 317.
  • Revision ID: aaron@canonical.com-20130717215542-yi2aqwd3m8limehm
Include owner in pile-id.

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
                with self.assertRaises(bzrlib.errors.NoSuchRevision):
358
358
                    job.decorate_bundle(bundle_data)
359
359
 
 
360
    def test_construct_id_omits_owner_if_promultated(self):
 
361
        payload = factory.get_payload_json(name='mysql', promulgated=True)
 
362
        pile_id = UpdateBundleJob.construct_id(payload, 5)
 
363
        self.assertEqual('mysql-5', pile_id)
 
364
 
 
365
    def test_construct_id_includes_owner_if_not_promultated(self):
 
366
        payload = factory.get_payload_json(name='mysql', promulgated=False)
 
367
        pile_id = UpdateBundleJob.construct_id(payload, 5)
 
368
        self.assertEqual('~charmers/mysql-5', pile_id)
 
369
 
 
370
 
360
371
    # TODO add bundles to index
361
372
    # TODO include owner in non-promulgated charm ids.
362
373