python requests mocking

x·2024년 7월 3일
0

test

목록 보기
4/4
@mock.patch("requests.get")
def test_(mock_get):
    mock_get.side_effect = Exception("error")
    
    # api 호출

0개의 댓글