2017-09-19 3 views

답변

2

mock.patch으로 고민하지 마십시오. pytest을 사용하고 있으므로 mentioned in the documentation

def test_thing(monkeypatch): 
    monkeypatch.setenv('VARNAME', 'var_value') 
을 사용해야합니다.