Skip to content
Browse files

Add a test for the old url redirect.

  • Loading branch information...
ralphbean committed Sep 15, 2015
1 parent d25abe4 commit 1db0435f7c6a35f7f7ae5179dcf65764c2b8f1f1
Showing with 20 additions and 0 deletions.
  1. +20 −0 bodhi/tests/functional/
@@ -337,6 +337,26 @@ def test_provenpackager_request_privs(self, publish, *args):
res = app.get('/updates/%s' % nvr, status=200)
eq_(res.json_body['can_edit'], False)

def test_old_bodhi1_redirect(self, publish, *args):
# Create it
title = 'bodhi-2.0.0-1.fc17''/updates/', self.get_update(title))
topic='update.request.testing', msg=mock.ANY)

# Get it once with just the title
url = '/updates/%s' % title
res =
update = res.json_body['update']

# Now try the old bodhi1 url. Redirect should take place.
url = '/updates/%s/%s' % (update['alias'], update['title'])
res =, status=302)
target = 'http://localhost/updates/%s' % update['alias']
self.assertEquals(res.headers['Location'], target)

def test_pkgdb_outage(self, *args):
"Test the case where our call to the pkgdb throws an exception"

0 comments on commit 1db0435

Please sign in to comment.
You can’t perform that action at this time.