Beispiel #1
0
def runFetching():

    print '[starting fetching online]'
    events = makeAll()
    aa = events



    print '[Fetched all data]'

    for i in range(len(events)):

        events[i] = transformMatches(events[i])

    print '[transformed all matches]'
    for i in range(len(events)):

        events[i] = transformEvent(events[i])

    print '[transformed all events]'
    xall = xAll(eventList = events)
    xmlreadyEvents = xall.render()
    file = open('bigobj','w')


    #xmlreadyEvents = xmlreadyEvents.replace(u'\xa0', u' ')
    xmlreadyEvents = xmlreadyEvents.encode('ascii','ignore')

    file.write(xmlreadyEvents)
    file.close()

    print '[written to file and done ! '
Beispiel #2
0
    def testBetScopeRange(self):

        match = xMatch(fighterOneName='mrwinner', fighterOneLine=1, fighterTwoName='mrloser', fighterTwoLine=2, fightWinnerWinner='mrwinner')

        event = xEvent(site= 'www.abc.com', name = 'yeye')

        event.match.append(match)
        eventlist = []
        eventlist.append(event)
        obj = xAll(eventList = eventlist)
        res = objectQuery.scopeBetRange(obj,0.9,1.1)

        self.assertEqual(1,res)