I'm converting a code base from Ruby to Python. In Ruby/RSpec I wrote custom "matchers" which allow me to black-box test web services like this:
describe 'webapp.com' do
it 'is configured for ssl' do
expect('www.webapp.com').to have_a_valid_cert
end
end
I'd like to write code to extend a Python testing framework with the same functionality. I realize that it will probably not look the same, of course. It doesn't need to be BDD. "Assert..." is just fine. Is pytest
a good candidate for extending? Are there any examples of writing extensions like these?