test: Use Django 3.2 HttpResponse.headers API
This commit is contained in:
parent
22bf508922
commit
0319f35e0f
|
@ -1779,7 +1779,7 @@ class DocTestCase(TestCase):
|
|||
self.client.login(username='ad', password='ad+password')
|
||||
r = self.client.post(urlreverse('ietf.doc.views_status_change.change_state',kwargs=dict(name=doc.name)),dict(new_state=iesgeval_pk))
|
||||
self.assertEqual(r.status_code, 302)
|
||||
r = self.client.get(r._headers["location"][1])
|
||||
r = self.client.get(r.headers["location"])
|
||||
self.assertContains(r, ">IESG Evaluation<")
|
||||
self.assertEqual(len(outbox), 2)
|
||||
self.assertIn('iesg-secretary',outbox[0]['To'])
|
||||
|
|
|
@ -556,7 +556,7 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
self.assertContains(r, "1. More work items underway")
|
||||
|
||||
|
||||
cont_disp = r._headers.get('content-disposition', ('Content-Disposition', ''))[1]
|
||||
cont_disp = r.headers.get('content-disposition', ('Content-Disposition', ''))[1]
|
||||
cont_disp = re.split('; ?', cont_disp)
|
||||
cont_disp_settings = dict( e.split('=', 1) for e in cont_disp if '=' in e )
|
||||
filename = cont_disp_settings.get('filename', '').strip('"')
|
||||
|
|
Loading…
Reference in a new issue