Hello All,

Postorius, as you all know, is the Web UI for Mailman 3 and is based 
on Django Web Framework. For some time now, we have been using
VCRPy, a HTTP Stubbing library to record test interactions with
Mailman Core' API so that the code can be tested in CI environments
with the need to have Core.

However, in the past, we have observed that it creates more problems
than it solves. First, we test against the state of Mailman Core in past,
since the interactions are recorded once and replayed all the time.
There are tapes dating back years, which could in theory have 
changed (though, API's backward compatibility guarantees avoids
breaking changes to happen without notice, but even with notice, 
tests would continue to pass). 

Other problem is that it creates friction when writing tests, which
was the biggest pain point for myself. You have to write tests, record
tapes and then make sure that you keep re-recording till the tests
pass. It is not easy to explain to early stage developers either.

Pytest is a new test runner and is pretty popular these days. I decided
to use it mostly due to strong support for fixtures and plugins. I wrote
a new fixture to make sure that Core's API is started before tests start
and all data is erased before each test class.

The changes are in this MR[1].

[1]: https://gitlab.com/mailman/postorius/merge_requests/406

I am also working on moving Core's tests to use pytest instead of
nose2,but that process is going to be longer since I am going to
have to rewrite some of the nose2 plugins we use there. Doctests
also need some attention. Here is the WIP MR[2] for that.

[2]: https://gitlab.com/mailman/mailman/merge_requests/500

-- 
  thanks,
  Abhilash Raj (maxking)
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to