@@ -0,0 +1,2299 @@
+import itertools%0Afrom datetime import date, datetime%0A%0Afrom pytz import UTC%0Afrom test_plus import TestCase%0A%0Afrom tournamentcontrol.competition.draw import (%0A    tournament_date_generator,%0A    weekly_date_generator,%0A)%0Afrom tournamentcontrol.competition.tests.factories import StageFactory%0A%0A%0Aclass DrawGenerationUtilities(TestCase):%0A    def setUp(self):%0A        super().setUp()%0A        self.stage = StageFactory.create(%0A            division__games_per_day=3,%0A            division__season__start_date=date(2022, 8, 2),%0A        )%0A%0A    def test_tournament_date_generator(self):%0A        with self.assertLogs(%22tournamentcontrol.competition.draw%22, %22DEBUG%22) as cm:%0A            res = tournament_date_generator(self.stage)%0A            self.assertCountEqual(%0A                itertools.islice(res, 10),%0A                %5B%0A                    date(2022, 8, 2),%0A                    date(2022, 8, 2),%0A                    date(2022, 8, 2),%0A                    date(2022, 8, 3),%0A                    date(2022, 8, 3),%0A                    date(2022, 8, 3),%0A                    date(2022, 8, 4),%0A                    date(2022, 8, 4),%0A                    date(2022, 8, 4),%0A                    date(2022, 8, 5),%0A                %5D,%0A            )%0A%0A        self.assertCountEqual(%0A            cm.output,%0A            %5B%0A                f%22DEBUG:tournamentcontrol.competition.draw:%22%0A                f%22Tournament date generator: '%7Bself.stage.title%7D' (2022-08-02 00:00:00+00:00:3)%22,%0A            %5D,%0A        )%0A%0A    def test_weekly_date_generator(self):%0A        with self.assertLogs(%22tournamentcontrol.competition.draw%22, %22DEBUG%22) as cm:%0A            res = weekly_date_generator(self.stage)%0A            self.assertCountEqual(%0A                itertools.islice(res, 5),%0A                %5B%0A                    datetime(2022, 8, 2, tzinfo=UTC),%0A                    datetime(2022, 8, 9, tzinfo=UTC),%0A                    datetime(2022, 8, 16, tzinfo=UTC),%0A                    datetime(2022, 8, 23, tzinfo=UTC),%0A                    datetime(2022, 8, 30, tzinfo=UTC),%0A                %5D,%0A            )%0A%0A        self.assertCountEqual(%0A            cm.output,%0A            %5B%0A                f%22DEBUG:tournamentcontrol.competition.draw:%22%0A                f%22Weekly date generator: '%7Bself.stage.title%7D' (2022-08-02 00:00:00+00:00)%22,%0A            %5D,%0A        )%0A

Add test case to demonstrate #40