<s> import mock <EOL> from rally . plugins . common . scenarios . requests import http_requests <EOL> from tests . unit import test <EOL> SCN = "<STR_LIT>" <EOL> class RequestScenarioTestCase ( test . TestCase ) : <EOL> @ mock . patch ( "<STR_LIT>" % SCN ) <EOL> def test_check_request ( self , mock__check_request ) : <EOL> Requests = http_requests . HttpRequests ( test . get_test_context ( ) ) <EOL> Requests . check_request ( "<STR_LIT>" , "<STR_LIT:GET>" , <NUM_LIT:200> ) <EOL> mock__check_request . assert_called_once_with ( "<STR_LIT>" , "<STR_LIT:GET>" , <NUM_LIT:200> ) <EOL> @ mock . patch ( "<STR_LIT>" % SCN ) <EOL> @ mock . patch ( "<STR_LIT>" % SCN ) <EOL> def test_check_random_request ( self , mock_choice , mock__check_request ) : <EOL> mock_choice . return_value = { "<STR_LIT:url>" : "<STR_LIT>" } <EOL> Requests = http_requests . HttpRequests ( test . get_test_context ( ) ) <EOL> Requests . check_random_request ( status_code = <NUM_LIT:200> , <EOL> requests = [ { "<STR_LIT:url>" : "<STR_LIT>" } ] ) <EOL> mock_choice . assert_called_once_with ( [ { "<STR_LIT:url>" : "<STR_LIT>" } ] ) <EOL> mock__check_request . assert_called_once_with ( <EOL> status_code = <NUM_LIT:200> , url = "<STR_LIT>" ) </s>
