Skip to content

Commit fa49287

Browse files
committed
Added a mock of urllib2.urlopen for another test which uses finalize(meeting) in order to prevent external http accesses when running tests.
- Legacy-Id: 13824
1 parent f0317b3 commit fa49287

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/meeting/tests_views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,12 @@ def test_proceedings_attendees(self, mock_urlopen):
365365
q = PyQuery(response.content)
366366
self.assertEqual(1,len(q("#id_attendees tbody tr")))
367367

368-
def test_proceedings_overview(self):
368+
@patch('urllib2.urlopen')
369+
def test_proceedings_overview(self, mock_urlopen):
369370
'''Test proceedings IETF Overview page.
370371
Note: old meetings aren't supported so need to add a new meeting then test.
371372
'''
373+
mock_urlopen.return_value = StringIO('[{"LastName":"Smith","FirstName":"John","Company":"ABC","Country":"US"}]')
372374
make_meeting_test_data()
373375
meeting = MeetingFactory(type_id='ietf', date=datetime.date(2016,7,14), number="96")
374376
finalize(meeting)

0 commit comments

Comments
 (0)