def test_login_no_password_required(self): client = Client() file = io.BytesIO() with client.session() as session: request = Request(self.get_url('/example (copy).txt')) request.username = '******' yield from session.start(request) yield from session.download(file)
def _add_request_password(self, request: Request): if self._fetch_rule.ftp_login: request.username, request.password = self._fetch_rule.ftp_login