Beispiel #1
0
class TestAdjudicatorDisable(BaseDebateTestCase):
    def setUp(self):
        super(TestAdjudicatorDisable, self).setUp()
        self.round = Round(tournament=self.t, seq=1)
        self.round.save()
        self.activate_all_adj(self.round)

        adj = Adjudicator.objects.get(name="Adjudicator00")
        self.round.activate_adjudicator(adj, False)

    def test_objects(self):
        self.failUnlessEqual(8, Adjudicator.objects.count())

    def test_active(self):
        self.failUnlessEqual(7, self.round.active_adjudicators.count())
Beispiel #2
0
 def setUp(self):
     super(RandomDrawTests, self).setUp()
     self.round = Round(tournament=self.t, seq=2, draw_type=Round.DRAW_RANDOM)
     self.round.save()
     self.activate_all_adj(self.round)
     self.activate_all_teams(self.round)
     self.activate_venues(self.round)
Beispiel #3
0
    def setUp(self):
        super(TestAdjudicatorDisable, self).setUp()
        self.round = Round(tournament=self.t, seq=1)
        self.round.save()
        self.activate_all_adj(self.round)

        adj = Adjudicator.objects.get(name="Adjudicator00")
        self.round.activate_adjudicator(adj, False)
Beispiel #4
0
class RandomDrawTests(BaseDebateTestCase):

    def setUp(self):
        super(RandomDrawTests, self).setUp()
        self.round = Round(tournament=self.t, seq=2, draw_type=Round.DRAW_RANDOM)
        self.round.save()
        self.activate_all_adj(self.round)
        self.activate_all_teams(self.round)
        self.activate_venues(self.round)

    def test_std(self):
        self.round.draw()

        self.failUnlessEqual(6, Debate.objects.count())
        self.failUnlessEqual(12, DebateTeam.objects.count())

        for team in Team.objects.all():
            self.failUnlessEqual(1, DebateTeam.objects.filter(team=team).count())