#3757 closed enhancement (fixed)

Refactor test_introducer in web module tests to use a single base test case class.

Reported by: fenn-cs Owned by: GitHub <noreply@…>
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description (last modified by fenn-cs)

It would be great to make consistent use of one base test class in the web module rather than switching between unittest.TestCase and testools.TestCase extended in SyncTestCase and AsyncTestCase

See : src/allmydata/test/web/test_introducer.py

Change History (4)

comment:1 Changed at 2021-08-05T11:00:54Z by exarkun

src/allmydata/test/web is a whole package containing 6300 lines of test code. I suggest narrowing the scope here a little further - for example, to just test_introducer or test_root.

Also, let's make it explicit. The preferred base class should be SyncTestCase?. Where necessary, AsyncTestCase? can be used (but if it is not necessary in a particular case, or if we can easily rewrite some test code to not require it, we should use SyncTestCase?).

comment:2 Changed at 2021-08-05T11:58:22Z by fenn-cs

Thanks @exarkun that makes sense. I think we should default to SyncTestCase it's used in more places and seems to be the natural choice for a default if we would pick any.

comment:3 Changed at 2021-08-05T11:59:40Z by fenn-cs

  • Description modified (diff)
  • Summary changed from Refactor web module tests to use a single base test case class. to Refactor test_introducer in web module tests to use a single base test case class.

comment:4 Changed at 2021-08-11T21:21:53Z by GitHub <noreply@…>

  • Owner set to GitHub <noreply@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 580af66/trunk:

Merge pull request #1100 from Fenn-CS/3757.refactor.web-test-introducer

Refactor allmydata/test/web/test_introducer.py

Fixes: ticket:3757

Note: See TracTickets for help on using tickets.