from django.test import TestCase
from django.utils import timezone as tz

from scoreboard.models import *


class GameUnitTests(TestCase):
    @classmethod
    def setUpClass(cls):
        super(GameUnitTests, cls).setUpClass()
        cls.home_team = Team.objects.create(name='Home')
        cls.visiting_team = Team.objects.create(name='Away')
        cls.game = Game.objects.create(home_team=cls.home_team, visiting_team=cls.visiting_team, time=tz.now())

    def test_home_score_zero(self):
        self.assertEqual(0, self.game.home_score())

    def test_away_score_zero(self):
        self.assertEqual(1, self.game.visiting_score())

@@ -569,32 +569,856 @@
 ore_zero(self):%0A
+        self.assertEqual(0, self.game.visiting_score())%0A%0A    def test_home_score_one(self):%0A        Goal.objects.create(game=self.game,%0A                            game_time_minutes=1,%0A                            game_time_seconds=1,%0A                            team=self.home_team,%0A                            player_number=26%0A                            )%0A        self.assertEqual(1, self.game.home_score())%0A        self.assertEqual(0, self.game.visiting_score())%0A%0A    def test_away_score_one(self):%0A        Goal.objects.create(game=self.game,%0A                            game_time_minutes=1,%0A                            game_time_seconds=1,%0A                            team=self.visiting_team,%0A                            player_number=26%0A                            )%0A        self.assertEqual(0, self.game.home_score())%0A
         self.ass
@@ -1437,28 +1437,29 @@
 self.game.visiting_score())%0A
+%0A

Fix failing test and add 2 more