1. 8
  1. 3

    I posted this not because it’s earth shattering, but because it offers a bunch of helpful techniques actually written out in practice so folks struggling with coming up to speed with unit testing can benefit.

    1. 2

      Good tips !

      I ended up doing the same techniques at work and it works great.

      On thing I do differently is that I tend to create a test file per class where each public method is tested in a dedicated test suite, like:

      class TestRefresh(TestCase):

      def test_success(self): pass

      def test_fail_when_some_reason(self): pass

      1. 2

        I have an irrational dislike of anything that smells like Java unittest so I always use Pytest :)