~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/launchpad/webapp/tests/test_publication.py

[rs=buildbot-poller] automatic merge from stable. Revisions: 14275,
        14276, 14277 included.

Show diffs side-by-side

added added

removed removed

Lines of Context:
381
381
        maybe_block_offsite_form_post(FakeNonBrowserRequest)
382
382
 
383
383
    def test_onsite_posts(self):
384
 
        # Other than the explicit execptions, all POSTs have to come from a
 
384
        # Other than the explicit exceptions, all POSTs have to come from a
385
385
        # known LP virtual host.
386
386
        for hostname in allvhosts.hostnames:
387
387
            referer = 'http://' + hostname + '/foo'
391
391
            maybe_block_offsite_form_post(request)
392
392
 
393
393
    def test_offsite_posts(self):
394
 
        # If a post comes from an unknown host an execption is raised.
 
394
        # If a post comes from an unknown host an exception is raised.
395
395
        disallowed_hosts = ['example.com', 'not-subdomain.launchpad.net']
396
396
        for hostname in disallowed_hosts:
397
397
            referer = 'http://' + hostname + '/foo'