3
pylons.url 객체를 호출하는 메소드를 테스트하고 싶습니다. 그러나 시험이를 호출하면 오류가 리드 :Pylons의 url 객체 모방
TypeError: No object (name: url) has been registered for this thread
그래서 나는 모의 라이브러리에서 모의로 pylons.url 객체를 교체하고 싶습니다.
@patch('pylons.url')
def my_test(self, url_mock):
...
그러나이 것은 URL 개체를 대체하지 않는 것처럼 보입니다.
이 개체를 조롱하는 방법이 있습니까?