<s> import main <EOL> import mock <EOL> import pytest <EOL> import webtest <EOL> @ pytest . fixture <EOL> def app ( ) : <EOL> return webtest . TestApp ( main . app ) <EOL> def test_url_lib ( app ) : <EOL> response = app . get ( '<STR_LIT:/>' ) <EOL> assert response . status_int == <NUM_LIT:200> <EOL> assert "<STR_LIT>" in response . body <EOL> @ mock . patch ( "<STR_LIT>" ) <EOL> def test_url_fetch ( urlfetch_mock , app ) : <EOL> urlfetch_mock . fetch = mock . Mock ( <EOL> return_value = mock . Mock ( content = "<STR_LIT>" , <EOL> status_code = <NUM_LIT:200> ) ) <EOL> response = app . get ( '<STR_LIT>' ) <EOL> assert response . status_int == <NUM_LIT:200> <EOL> assert "<STR_LIT>" in response . body <EOL> @ mock . patch ( "<STR_LIT>" ) <EOL> def test_url_post ( urlfetch_mock , app ) : <EOL> urlfetch_mock . fetch = mock . Mock ( <EOL> return_value = mock . Mock ( content = "<STR_LIT>" , <EOL> status_code = <NUM_LIT:200> ) ) <EOL> response = app . get ( '<STR_LIT>' ) <EOL> assert response . status_int == <NUM_LIT:200> <EOL> assert "<STR_LIT>" in response . body </s>
