~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/tests/test_bugs.py

  • Committer: Curtis Hovey
  • Date: 2011-03-02 21:44:33 UTC
  • mto: This revision was merged to the branch mainline in revision 12525.
  • Revision ID: curtis.hovey@canonical.com-20110302214433-yti4enzqrnhhfoxy
Return early of the bug id is not a basestring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        self.assertEqual(
58
58
            "Bug 'fnord' is not registered.", view.error_message)
59
59
        self.assertEqual(None, view.request.response.getHeader('Location'))
 
60
 
 
61
    def test_redirect_list_of_bug_fail(self):
 
62
        # The view reports an error and does not redirect if list is provided
 
63
        # instead of a string.
 
64
        form = dict(id=['fnord', 'pting'])
 
65
        view = create_initialized_view(
 
66
            self.application, name='+index', layer=BugsLayer, form=form)
 
67
        self.assertEqual(
 
68
            "Bug ['fnord', 'pting'] is not registered.", view.error_message)
 
69
        self.assertEqual(None, view.request.response.getHeader('Location'))