Tobias Mayr

Results 15 comments of Tobias Mayr

Thanks! That actually did the trick!

Thank you for your input, I will try to fix that next week

Made the changes but I still need test it with the server and add unit tests

I made some code changes implementing the suggestions in your comments. Thank you @wRAR I also tried this code with my SFTP server and it works with a newer twisted...

> Regarding tests, I thought about running some methods that cause `ESMTPSender._getContextFactory()` to be called (as this is the method that works differently with and without `self._hostname`) Wouldn't I then...

> Have you tried to call some more high-level TLS-related methods that check `_hostname` instead of checking it directly? See [#5406 (comment)](https://github.com/scrapy/scrapy/pull/5406#issuecomment-1049688762) I think I got it now. I found...

The coverage report tells me that the body of this `if`-block is not covered: ``` if twisted_version >= Version('twisted', 21, 2, 0): factory_keywords['hostname'] = self.smtphost ``` It seems like the...

> According to the [pull request coverage report](https://app.codecov.io/gh/scrapy/scrapy/compare/5406/diff) it gets called at least 6 times. So I think we can ignore the codecov/patch issue. Good to know! We'd still have...

@wRAR do you think I should just write a test for `_sendmail` to cover the line of the function call (see previous comment)? I'm not sure if this would be...

Right @wRAR. Not sure if mocking a SMTP would be beneficial here. As the only purpose would be to cover this one function call. Do you think the coverage target...