def test_add_publication(self): resp = application.get_response( '/medium/add?auth_entity_key=%s&state={"feature":"webmention"}&blog=b45573563f5a' % self.auth_entity.key.urlsafe(), method='POST') self.assertEquals(302, resp.status_int) loc = urllib.unquote_plus(resp.headers['Location']) self.assertTrue(loc.startswith('http://localhost/'), loc) self.assert_created_publication()