我正在尝试从使用Django测试客户端切换到RequestFactory,以加快测试速度。但是,RequestFactory生成的请求没有为视图提供适当的kwargs。': '12345'}), print('\n\nResponse for TestClient: ', response.content.decode())
)
r
我尝试创建一个请求,使用RequestFactory和post with file,但我无法获得request.FILES。from django.test.client import RequestFactory
from django.core.files import temp as tempfile
我从一个干净的请求创建了一个代理,然后设置了一些属性。它对其中一些人有效,但对于其他人,我得到了一个IllegalArgumentException。 MyProxy my = myRequest.create(MyProxy.class);我在com.google.web.bindery.event.shared.SimpleEventBus.doFire()中得到了java.lang.IllegalArgument