예제 #1
0
 def testIsMatchCompletePlayed(self):
     xml = """
     <match>
         <playedMatch>
             <teamInMatch>
                 <battingFirst>true</battingFirst>
                 <innings>
                     <runsScored>140</runsScored>
                     <wicketsLost>6</wicketsLost>
                 </innings>
             </teamInMatch>
             <teamInMatch>
                 <battingFirst>false</battingFirst>
                 <innings>
                     <runsScored>141</runsScored>
                     <wicketsLost>4</wicketsLost>
                     <ballsBowled>60</ballsBowled>
                 </innings>
             </teamInMatch>
         </playedMatch>
     </match>
     """
     matchElement = ElementTree.fromstring(xml)
     generator = LeagueFixturesReportGenerator()
     result = generator.isMatchComplete(matchElement)
     expectedResult = True
     self.assertEqual(expectedResult, result)
예제 #2
0
 def testIsMatchCompletePlayed(self):
     xml = """
     <match>
         <playedMatch>
             <teamInMatch>
                 <battingFirst>true</battingFirst>
                 <innings>
                     <runsScored>140</runsScored>
                     <wicketsLost>6</wicketsLost>
                 </innings>
             </teamInMatch>
             <teamInMatch>
                 <battingFirst>false</battingFirst>
                 <innings>
                     <runsScored>141</runsScored>
                     <wicketsLost>4</wicketsLost>
                     <ballsBowled>60</ballsBowled>
                 </innings>
             </teamInMatch>
         </playedMatch>
     </match>
     """
     matchElement = ElementTree.fromstring(xml)
     generator = LeagueFixturesReportGenerator()
     result = generator.isMatchComplete(matchElement)
     expectedResult = True
     self.assertEqual(expectedResult, result)
예제 #3
0
 def testIsMatchCompleteNotPlayedOrAwarded(self):
     xml = """
     <match>
     </match>
     """
     matchElement = ElementTree.fromstring(xml)
     generator = LeagueFixturesReportGenerator()
     result = generator.isMatchComplete(matchElement)
     expectedResult = False
     self.assertEqual(expectedResult, result)
예제 #4
0
 def testIsMatchCompleteNotPlayedOrAwarded(self):
     xml = """
     <match>
     </match>
     """
     matchElement = ElementTree.fromstring(xml)
     generator = LeagueFixturesReportGenerator()
     result = generator.isMatchComplete(matchElement)
     expectedResult = False
     self.assertEqual(expectedResult, result)