Пример #1
0
    def testCreateEvent(self):

        events = fetcher.getWikiFightByName()
        event =  events[0]
        wlobjs = fetcher.getWikiFightResults(event.site)
        #url = fetcher.getEventPageFromName(event.name)
        data =fetcher.getEventDataByName(event.name)
        result = fetcher.joinResultAndLines(data,wlobjs)

        self.assertEqual('Stephen Thompson',result[0].fightWinnerWinner)
        self.assertEqual(1.34,result[0].fighterOneLine)
        self.assertEqual(3.45,result[0].fighterTwoLine)
Пример #2
0
    def testGetFightsByUrl(self):
        fights = fetcher.getWikiFightResults('https://en.wikipedia.org/wiki/UFC_on_Fox:_Johnson_vs._Bader')

        self.assertEqual('Anthony Johnson',fights[0].winner)

        self.assertEqual('Ryan Bader',fights[0].loser)