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
This commit is contained in:
parent
f0317b3cff
commit
fa49287cfa
|
@ -365,10 +365,12 @@ class MeetingTests(TestCase):
|
|||
q = PyQuery(response.content)
|
||||
self.assertEqual(1,len(q("#id_attendees tbody tr")))
|
||||
|
||||
def test_proceedings_overview(self):
|
||||
@patch('urllib2.urlopen')
|
||||
def test_proceedings_overview(self, mock_urlopen):
|
||||
'''Test proceedings IETF Overview page.
|
||||
Note: old meetings aren't supported so need to add a new meeting then test.
|
||||
'''
|
||||
mock_urlopen.return_value = StringIO('[{"LastName":"Smith","FirstName":"John","Company":"ABC","Country":"US"}]')
|
||||
make_meeting_test_data()
|
||||
meeting = MeetingFactory(type_id='ietf', date=datetime.date(2016,7,14), number="96")
|
||||
finalize(meeting)
|
||||
|
|
Loading…
Reference in a new issue