Ejemplo n.º 1
0
 def strike(self, player, points, foul=False):
     strike = Strike()
     strike.frame = self.frame
     strike.player = player
     strike.points = points
     strike.foul = foul
     strike.save()
     return strike
Ejemplo n.º 2
0
 def test_strike_player_not_in_match(self):
     player3 = Player()
     player3.name = 'third'
     player3.save()
     strike = Strike()
     strike.points = 1
     strike.frame = self.frame
     strike.player = player3
     self.assertRaises(ValidationError, strike.save)