如何在具有接口的API客户端中嵌套端点,同时保持可读性 我试图组成一个简单的API客户端,但我一直试图弄清楚如何使其变得可读和可测试.如何在保持可测试性的同时组成嵌套结构? 伪代码: type VehicleEndpoint struct { Car CarEndpoint VehicleGetter } type VehicleGetter interface { Get(string) Vehicle } t .. 发布时间:2020-05-10 01:41:36 go mocking composition apiclient 其他开发
Django APIClient登录不起作用 我在单元单元测试中使用Django Rest Framework API进行身份验证时遇到问题.通过浏览器访问系统时,系统可以按预期工作.但是,在以下端点上向以下类发送放置请求时,我收到401 HTTP状态: class UserDetail(RetrieveModelMixin, DestroyModelMixin, UpdateModelMixin, GenericViewSet): .. 发布时间:2020-05-03 10:01:05 django rest authentication frameworks apiclient 其他开发