示例#1
0
 def test_change_playground_accepts_valid_time(self):
     """
     playtime ('2000', '2200') is valid in both playgrounds
     """
     game = Game(playground=self.playground_a, playtime=('2000', '2200'), players=self.players)
     game.change_playground(self.playground_b)
     self.assertEqual(game.get_playground(), self.playground_b)
示例#2
0
 def test_change_playground_doesnt_accept_invalid_time(self):
     """
     playtime ('2200', '2359') is valid in the original playground but isn't valid in the new one.
     """
     game = Game(playground=self.playground_b, playtime=('2200', '2359'), players=self.players)
     self.assertRaises(InvalidPlaytimeException, lambda: game.change_playground(self.playground_a))