Example #1
0
 def test_get_by_project_revision(self):
   """Can look up a release candidate by project & revision
   """
   actual = release_candidate.get_by_project_revision(self.project_id,
       self.revision)
   eq_(actual['release_candidate_id'], self.rc_id)
   eq_(actual['code_tarball_location'], self.code_tarball)
Example #2
0
 def test_duplicate_builds(self):
   """Registering an existing build overwrites the old release candidate
   """
   before_count = release_candidate.mget_by_project(self.project_id,
       count=True)
   eq_(before_count, 1,
       "GUARD: Found more than one initial release candidates")
   new_code = '/new/tarball/path'
   new_venv = '/new/venv/path'
   self.rc_id = release_candidate.create(self.project_id, 'master',
       self.revision, new_code, new_venv)
   after = release_candidate.get_by_project_revision(self.project_id,
       self.revision)
   eq_(after['code_tarball_location'], new_code)
   eq_(after['venv_tarball_location'], new_venv)
   after_count = release_candidate.mget_by_project(self.project_id,
       count=True)
   eq_(after_count, 1, "Multiple entries created for project")