def test_downvote_below_zero_raises_exception(self): rager = Performance("Nathan Trinkl's Birthday Bash", datetime.datetime(18, 3, 16, 9, 55)) anant = Performer("Anant Sahai", 94704, "I reenact animes.") rager.register(anant) with self.assertRaises(ValueError): rager.downvote(anant)
def test_register(self): rager = Performance("Nathan Trinkl's Birthday Bash", datetime.datetime(18, 3, 16, 9, 55)) anant = Performer("Anant Sahai", 94704, "I reenact animes.") self.assertTrue(anant not in rager.unapproved_performers) rager.register(anant) self.assertTrue(anant in rager.unapproved_performers)