示例#1
0
文件: tests.py 项目: Rocky443/Tabbie
 def setUp(self):
     super(RandomDrawTests, self).setUp()
     self.round = Round(seq=2, type=Round.DRAW_RANDOM)
     self.round.save()
     self.activate_all_adj(self.round)
     self.activate_all_teams(self.round)
     self.activate_venues(self.round)
示例#2
0
文件: tests.py 项目: Rocky443/Tabbie
    def setUp(self):
        super(TestAdjudicatorDisable, self).setUp()
        self.round = Round(seq=1)
        self.round.save()
        self.activate_all_adj(self.round)

        adj = Adjudicator.objects.get(name="Adjudicator00")
        self.round.activate_adjudicator(adj, False)
示例#3
0
文件: tests.py 项目: Rocky443/Tabbie
class TestAdjudicatorDisable(BaseTest):
    def setUp(self):
        super(TestAdjudicatorDisable, self).setUp()
        self.round = Round(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())
示例#4
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())
示例#5
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)
示例#6
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)
示例#7
0
文件: tests.py 项目: Rocky443/Tabbie
class RandomDrawTests(BaseTest):
    def setUp(self):
        super(RandomDrawTests, self).setUp()
        self.round = Round(seq=2, 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())
示例#8
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())