allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
95 stars 125 forks source link

SSL cert checking via CLI option #12

Closed chartjes closed 8 years ago

chartjes commented 8 years ago

The instance of TestRail we are currently using at Mozilla doesn't have an SSL certificate that the Requests library considers valid. At some point we'll fix that issue but in order for the plugin to work for as I modified the code at accept a '--no-ssl-cert-check' CLI option that will in turn set verify=False when the Requests makes a post.

By default --no-ssl-cert-check is set to False, and I have code that inverts the value so that verify=True will be the default.

I also removed the try-catch stuff around send_post and send_get after discovering trapping exceptions probably isn't good behaviour -- can't do POSTs using verify=false. ;)

Version is bumped to 0.0.8

@allankilpatrick r?

allankilpatrick commented 8 years ago

@chartjes unit tests will need to be updated due to the extra argument in TestRailPlugin

Can you add a test(s) for the flag too please.

README update would be nice too. Run make README.rst to generate the correct doc for packaging.

chartjes commented 8 years ago

Yes, I'm currently working on that and discovering some interesting differences between Python mocking tools and PHP ones. ;)

chartjes commented 8 years ago

Tests now passing.

@allankilpatrick r?

allankilpatrick commented 8 years ago

@chartjes nice 😄

just some formatting needs reverted back.

chartjes commented 8 years ago

@allankilpatrick

The reason for a lot of those changes is because my editor complains about lines being longer than 79 characters are a PEP-8 violation and I'm pretty sure the requirements for plugins state that they should be PEP-8 compliant.

If you don't care about that, I can revert those lines.

allankilpatrick commented 8 years ago

the repo has a setup.cfg for flake8 which 119. PEP8 is an interesting subject but feel that the code being easier to read over having randomish line breaks is better.

Maybe you have seen this, maybe not https://www.youtube.com/watch?v=wf-BqAjZb8M Its a good one to watch 😄

If you could revert them, it would be appreciated

chartjes commented 8 years ago

Reverted and flake8 preferences noted

@allankilpatrick r?

allankilpatrick commented 8 years ago

@chartjes thanks