def setUpClass(cls):
     # Initializing Staff for testing
     cls.zidane = staff('Zinedine Zidane', 'France', 5500000, 9, 'Skipper')
     cls.vazquez = staff('Roberto Vazquez', 'Spain', 3200000, 1,
                         'Goalkeeping Coach')
     # Initial izing Players for testing
     cls.ramos = player('Sergio Ramos', 'Spain', 1500000, 14, 'Right Back',
                        15)
     cls.benzema = player('Karim Benzema', 'France', 7920000, 10, 'Striker',
                          9)
Example #2
0
    def setUp(self):
        # Initializing members to be reset each time
        self.p1 = player('Player 1', 'Germany', 4000000, 5, 'Midgard', 42)
        self.p2 = player('Player 2', 'Canada', 8300000, 7, 'Center Mid', 22)
        self.s1 = staff('Staff 1', 'Spain', 63000, 23, 'Groundskeeper')
        self.s2 = staff('Staff 2', 'Spain', 83000, 3, 'Accountant')

        self.d1 = domestic("Daniel Silva", "Mesut Ozil", 0, "Sevilla", False,
                           20)
        self.d2 = domestic("Agatha Christie", "Robert Lewandowski", 3,
                           "Barcelona", True, 9)
        self.i1 = international("Haruki Murakami", "Rodrygo", 3, "Tokyo",
                                "Japan", "TV")
        self.i2 = international("Leo Tolstoy", "Alexis Sanchez", 11, "Moscow",
                                "Russia", "Online")
Example #3
0
    def setUpClass(cls):
        # Temproary variables to be stored into the club
        ramos = player('Sergio Ramos', 'Spain', 1500000, 14, 'Right Back', 15)
        benzema = player('Karim Benzema', 'France', 7920000, 10, 'Striker', 9)
        vazquez = staff('Roberto Vazquez', 'Spain', 3200000, 1,
                        'Goalkeeping Coach')
        zidane = staff('Zinedine Zidane', 'France', 5500000, 9, 'Skipper')
        plist = [ramos.asList(), benzema.asList()]
        slist = [vazquez.asList(), zidane.asList()]

        connor = domestic("Connor Lee", "Sergio Ramos", 5, "Madrid", True, 8)
        akash = international("Akash Dhatavkar", "Leo Messi", 4, "Kelowna",
                              "Canada", "TV")
        joe = domestic("Joe Miller", "Eden Hazard", 7, "Valencia", False, 12)
        jane = international("Jane Doe", "Marco Reus", 8, "San Francisco",
                             "US", "Online")
        dlist = [connor.asList(), joe.asList()]
        ilist = [akash.asList(), jane.asList()]

        # Initializing club with 2 players, 2 staff, 2 domestic and 2 international
        cls.madrid = club.club(plist, slist, dlist, ilist)
Example #4
0
 def addPlayer(self, name, nationality, salary, yearsWClub, position,
               jersey):
     newPlayer = mt.player(name, nationality, salary, yearsWClub, position,
                           jersey)
     self.members['players'].append(newPlayer)