|
3 | 3 |
|
4 | 4 |
|
5 | 5 | import json |
6 | | -import html |
7 | 6 | import os |
8 | 7 | import shutil |
9 | 8 | import sys |
|
15 | 14 | from django.conf import settings |
16 | 15 | from django.test import Client |
17 | 16 | from django.urls import reverse as urlreverse |
18 | | -from django.utils import timezone |
| 17 | +from django.utils import html, timezone |
19 | 18 |
|
20 | 19 | from tastypie.test import ResourceTestCaseMixin |
21 | 20 |
|
@@ -56,10 +55,10 @@ def test_notify_meeting_import_audio_files(self, mock_import_audio): |
56 | 55 | # try invalid method GET |
57 | 56 | url = urlreverse('ietf.meeting.views.api_import_recordings', kwargs={'number':meeting.number}) |
58 | 57 | r = client.get(url) |
59 | | - self.assertEqual(r.status_code, 405) |
| 58 | + self.assertResponseStatus(r, 405) |
60 | 59 | # try valid method POST |
61 | 60 | r = client.post(url) |
62 | | - self.assertEqual(r.status_code, 201) |
| 61 | + self.assertResponseStatus(r, 201) |
63 | 62 |
|
64 | 63 | def test_api_help_page(self): |
65 | 64 | url = urlreverse('ietf.api.views.api_help') |
@@ -282,7 +281,7 @@ def test_api_v2_person_export_view(self): |
282 | 281 |
|
283 | 282 | # working case |
284 | 283 | r = self.client.post(url, {'apikey': apikey.hash(), 'email': secretariat.email().address, '_expand': 'user'}) |
285 | | - self.assertEqual(r.status_code, 200) |
| 284 | + self.assertResponseStatus(r, 200) |
286 | 285 | jsondata = r.json() |
287 | 286 | data = jsondata['person.person'][str(secretariat.id)] |
288 | 287 | self.assertEqual(data['name'], secretariat.name) |
|
0 commit comments