class CommandTests(TestCase): fixtures = ['beerstyles', 'contestyears', 'entries', 'users', 'judgingresults', 'bjcpjudgingresults'] def setUp(self): self.command = Command() def test_handle(self): self.assert_(Entry.objects.filter(winner=True).count() == 3) self.command.handle(2011) self.assert_(Entry.objects.filter(winner=True).count() == 6) # the ipa should now be judged as first place ipa = Entry.objects.get(pk=1) self.assert_(ipa.winner) self.assert_(ipa.rank == 1) self.assert_(ipa.score == 63)
def setUp(self): self.command = Command()