def setUp(self): self.crawler = IOLCrawler() self.crawler.fetch_json_info = lambda x: self.doc_info self.maxDiff = None self.db = db self.db.drop_all() self.db.create_all() seed_db(db)
class TestIOLCrawler(unittest.TestCase): def setUp(self): self.crawler = IOLCrawler() self.crawler.fetch_json_info = lambda x: self.doc_info self.maxDiff = None self.db = db self.db.drop_all() self.db.create_all() seed_db(db) def tearDown(self): self.db.session.remove() self.db.drop_all() def test_extract(self): self.doc_info = {"id":1335083,"category":"motoring/industry-news","title":"Cellphone crackdown - first busts","published":"2012-07-05T12:10","byline":"Murray Williams","paragraphs":["The first cellphone confiscation has taken place in Cape Town, as the new law was enforced for the first time. ","As of today, drivers who are caught talking on their phones while driving, without headsets or hands-free kits, will have their handsets confiscated by traffic officers. ","The first driver caught this morning was Jean-Benoit Biyoko, a taxi driver. Traffic officers nabbed him in Long Street in the CBD. ","The traffic service's Maxine Jordaan reported: “He didn't have a driving licence on him and he was taken to Gallows Hill traffic department. ","“His cellphone, a Nokia E63, had a SIM card and memory card in it, which he kept, and he kept his pouch too. ","<strong>“The gentleman was very co-operative and said he was sorry.”</strong> ","Jordaan said Biyoko had been fined R500 for talking on his cellphone while driving and would be permitted to collect his phone 24 hours after it was confiscated - on Friday morning. ","The new City law was to be enforced across the city this afternoon, with officers from the undercover 'Ghost Squad', and other officers, deployed on major commuter routes. ","Officers' vehicles will carry special boxes, in which confiscated phones will be placed once they have been logged and sealed in protective pouches. They will then be stored in the traffic department's safe at Gallows Hill. ","<strong>No fee is required to reclaim a confiscated phone.</strong> ","The bylaw was introduced by safety and security Mayco member JP Smith, who has received praise from across the country for the action against drivers who continue to flout the law. ","Smith said camera and video evidence would be used whenever possible to back up officers' observations. ","“We're hoping that everybody will finally get the message, grab those hands-free kits and start using cellphones legally”, Smith said. ","“We issue a minimum of 8000 fines a month for illegal cellphone use while driving. But it's not changing behaviour, so we must find a more powerful disincentive. ","“Illegal cellphone use is classified as 'distracted driving' and is one of the four ost dangerous driving habits, with speeding, drinking and driving and not wearing seatbelts.” - Cape Argus ","<a href=\"http://www.iol.co.za/newsletters\" target=\"_blank\">Motoring newsletter - click here to keep up to speed with the best in motoring</a>","<hr>"],"images":[{"id":"iol-mot-pic-jul5-cell-phone-impoundment-1-1.1335082/2802609312","credit":"INLSA","caption":"Taxi driver Jean-Benoit Biyoko was caught talking on his phone while driving in Long Street. Picture: Henk Kruger","url":"http://www.iol.co.za/polopoly_fs/iol-mot-pic-jul5-cell-phone-impoundment-1-1.1335082!/image/2802609312.jpg_gen/derivatives/box_300/2802609312.jpg"}],"relatedStories":[{"link":"http://www.iol.co.za/motoring/industry-news/cellphone-use-it-you-ll-lose-it-1.1333846","title":"Cellphone: Use it, you'll lose it!"},{"link":"http://www.iol.co.za/news/south-africa/kwazulu-natal/kzn-drivers-could-also-lose-phones-1.1333884","title":"KZN drivers could also lose phones"}],"description":"Cape Town cops have begun confiscating cellphones from drivers not using hands-free kits."} doc = Document() doc.url = 'http://www.iol.co.za/motoring/industry-news/cellphone-crackdown-first-busts-1.1335083#.UzvU562SxWs' self.crawler.extract(doc, None) self.assertEqual(doc.title, 'Cellphone crackdown - first busts') self.assertEqual(doc.summary, 'Cape Town cops have begun confiscating cellphones from drivers not using hands-free kits.') self.assertEqual(doc.published_at.strftime('%d %m %Y'), '05 07 2012') self.assertEqual(doc.author.name, 'Murray Williams') self.assertEqual(doc.medium.name, 'IOL') self.assertEqual(doc.text, u"The first cellphone confiscation has taken place in Cape Town, as the new law was enforced for the first time.\n\nAs of today, drivers who are caught talking on their phones while driving, without headsets or hands-free kits, will have their handsets confiscated by traffic officers.\n\nThe first driver caught this morning was Jean-Benoit Biyoko, a taxi driver. Traffic officers nabbed him in Long Street in the CBD.\n\nThe traffic service's Maxine Jordaan reported: \u201cHe didn't have a driving licence on him and he was taken to Gallows Hill traffic department.\n\n\u201cHis cellphone, a Nokia E63, had a SIM card and memory card in it, which he kept, and he kept his pouch too.\n\n\u201cThe gentleman was very co-operative and said he was sorry.\u201d\n\nJordaan said Biyoko had been fined R500 for talking on his cellphone while driving and would be permitted to collect his phone 24 hours after it was confiscated - on Friday morning.\n\nThe new City law was to be enforced across the city this afternoon, with officers from the undercover 'Ghost Squad', and other officers, deployed on major commuter routes.\n\nOfficers' vehicles will carry special boxes, in which confiscated phones will be placed once they have been logged and sealed in protective pouches. They will then be stored in the traffic department's safe at Gallows Hill.\n\nNo fee is required to reclaim a confiscated phone.\n\nThe bylaw was introduced by safety and security Mayco member JP Smith, who has received praise from across the country for the action against drivers who continue to flout the law.\n\nSmith said camera and video evidence would be used whenever possible to back up officers' observations.\n\n\u201cWe're hoping that everybody will finally get the message, grab those hands-free kits and start using cellphones legally\u201d, Smith said.\n\n\u201cWe issue a minimum of 8000 fines a month for illegal cellphone use while driving. But it's not changing behaviour, so we must find a more powerful disincentive.\n\n\u201cIllegal cellphone use is classified as 'distracted driving' and is one of the four ost dangerous driving habits, with speeding, drinking and driving and not wearing seatbelts.\u201d - Cape Argus\n\nMotoring newsletter - click here to keep up to speed with the best in motoring\n\n") def test_isolezwe(self): self.doc_info = {"id":1667768,"category":"isolezwe","title":"EzikaMalema zethule abazo eKZN","published":"2014-03-28T09:57","byline":"CELANI SIKHAKHANE noSIMPHIWE NGUBANE","paragraphs":["<strong>CELANI SIKHAKHANE noSIMPHIWE NGUBANE</strong> ","<strong>I</strong>-Economic Freedom Fighters (EFF) KwaZulu-Natal ifolosa ngabesifazane nentsha ohlwini lwayo lwamagama okuqala ayishumi abaholi abazoyimela esiShayamthetho ngemva kokhetho lukazwelonke oluzoba ngoMeyi 7. ","Lokhu kugqame izolo ngenkathi i-EEF yethula abaholi bayo abasohlwini lokhetho esithangamini nabezindaba eThekwini. ","Inxusa leqembu nokubhekwe ukuthi libe ngundunankulu wase-KZN uma i-EFF inqoba, nguMnuz Vusi Khoza. UKhoza uke waba yikhansela le-ANC eThekwini nonobhala weNFP esifundazweni. ","UKhoza uthe uhla lwabo lumele lonke uhlobo lwabantu abakhona e-KZN ngokobulili, ukuxuba intsha nabadala. ","UNksz Magdalene Moonsamy, obengumholi we-ANC Youth League nojutshwe ubuholi bukazwelonke esifundazweni, uthe iningi labaholi babo abazobamela eSishayamthetho banamakhono adingekayo futhi bayabethemba. ","“Abanye baholi bethu banomlando wokusebenzela abantu kusuka kwi-ANC nakwezinye izinhlaka njengoKhoza okunguye osimele njengondunankulu wesifundazwe,” kusho uNksz Moonsamy. ","Okufike kwagqama wukuthi ngesikhathi bebiza uKhoza abaholi bale nhlangano bebembiza ngondunankulu, yize kungakayiwa okhethweni. ","Phakathi kwamagama asohlwini lokuqala olubizwa nge-<em>Top 10</em> uKhoza,uNksz Thembi Msane, uMnuz Lwazi Ntombela, uNksz Londiwe Mkhwanazi, uMnuz Nhlanhla Buthelezi, uNksz Sbongile Khawula, uVerusca Fynn, uMnuz Reggie Ngcobo,uNksz Cebisile Shangase, uMnuz Nkosinathi Mthethwa. ","UNksz Moonsamy uthe abaholi babo bazimisele ukufunda okuningi njengoba beya eSishayamthetho. ","UKhoza uthe okubalulekile kubo wukuthi banqobe zonke izihlalo ezingu-80 eziseSishayamthetho. ","Ngaphandle kwamagama abaholi abayishumi abasohlwini , kuphinde kwethulwa nabanye abasohlwini lwesifundazwe abayingxenye yabantu abazoya eSishayamthetho. ","Kulesi sithangami kuphinde kwethulwa uMnuz Vukani Ndlovu ngokusemthethweni obedume ebuholini be-ANC Youth League ngenkathi ehola isigungu sesikhashana sesifundazwe esihlakazwe ngonyaka odlule. ","Abaholi baleli qembu bamile ekutheni bafuna ukusebenzisana nanoma yimuphi umbutho ozovumelana nabo ngemigomo ehambisana nokubuyiswa komhlaba ngaphandle kwesinxephezelo ukuthi uhlomulise bonke abantu bakuleli. ","UNksz Moonsamy uthe bangasebenzisana neFreedom Front Plus inqobo nje uma izimisele ukuvumelana nabo ngodaba lomhlaba, ivume ukuthi kumele ubesezandleni zabantu, hhayi zedlanzana. ","Abaholi baleli qembu abazange bacacise ukuthi banamalungu amangaki eKZN, bakhankasa nini nokuthi yiziphi izindlela abazisebenzisayo ukuxhumana nabantu njengoba bethi sebehlangane nabantu abaningi abampofu, abahola kancane, abasebenza ezindlini, abahlengikazi nabahlala emijondolo. ","Bathi iKZN sebeyiphendule yabomvu njengoba bexhumana nabantu kuzona zonke izingxenye zesifundazwe. ","UKhoza uthe abantu baseKZN basetshenziswa ngamaqembu ezepolitiki njengethuluzi lokuvota ukuze kucebe idlanzana eliphila ntofontofo. ","Uphinde wathi igama lesifundazwe selingcolile ezweni isidume njengendawo eyisizinda senkohlakalo ngenxa yomuzi kaMengameli Jacob Zuma owakhiwe ngoR246 million . "],"images":[{"id":"copy-of-no-no-moonsamyy0-1.1667766/3851252182","credit":"INL SA","caption":"UNKSZ Magdalene Moonsamy, osuka kwi-ANC Youth League, ujutshwe yisigungu se-EFF kuzwelonke ukuthi eze KwaZulu-Natal","url":"http://www.iol.co.za/polopoly_fs/copy-of-no-no-moonsamyy0-1.1667766!/image/3851252182.jpg_gen/derivatives/box_300/3851252182.jpg"},{"id":"copy-of-no-no-khoza0-1.1667767/4259951999","credit":"INLSA","caption":"UMNUZ Vusi Khoza, osuka kwi-ANC neNational Freedom Party, i-Economic Freedom Fighters imthwele ngeqoma ukuthi abe ngundunankulu eKZN","url":"http://www.iol.co.za/polopoly_fs/copy-of-no-no-khoza0-1.1667767!/image/4259951999.jpg_gen/derivatives/box_300/4259951999.jpg"}]} doc = Document() doc.url = 'http://www.iol.co.za/isolezwe/ezikamalema-zethule-abazo-ekzn-1.1667768#.UzvUR62SxWv' self.crawler.extract(doc, None) self.assertEqual(doc.title, 'EzikaMalema zethule abazo eKZN') self.assertEqual(doc.summary, None) self.assertEqual(doc.published_at.strftime('%d %m %Y'), '28 03 2014') self.assertEqual(doc.author.name, 'CELANI SIKHAKHANE noSIMPHIWE NGUBANE') self.assertEqual(doc.medium.name, 'Isolezwe') self.assertEqual(doc.text, u'CELANI SIKHAKHANE noSIMPHIWE NGUBANE\n\nI-Economic Freedom Fighters (EFF) KwaZulu-Natal ifolosa ngabesifazane nentsha ohlwini lwayo lwamagama okuqala ayishumi abaholi abazoyimela esiShayamthetho ngemva kokhetho lukazwelonke oluzoba ngoMeyi 7.\n\nLokhu kugqame izolo ngenkathi i-EEF yethula abaholi bayo abasohlwini lokhetho esithangamini nabezindaba eThekwini.\n\nInxusa leqembu nokubhekwe ukuthi libe ngundunankulu wase-KZN uma i-EFF inqoba, nguMnuz Vusi Khoza. UKhoza uke waba yikhansela le-ANC eThekwini nonobhala weNFP esifundazweni.\n\nUKhoza uthe uhla lwabo lumele lonke uhlobo lwabantu abakhona e-KZN ngokobulili, ukuxuba intsha nabadala.\n\nUNksz Magdalene Moonsamy, obengumholi we-ANC Youth League nojutshwe ubuholi bukazwelonke esifundazweni, uthe iningi labaholi babo abazobamela eSishayamthetho banamakhono adingekayo futhi bayabethemba.\n\n\u201cAbanye baholi bethu banomlando wokusebenzela abantu kusuka kwi-ANC nakwezinye izinhlaka njengoKhoza okunguye osimele njengondunankulu wesifundazwe,\u201d kusho uNksz Moonsamy.\n\nOkufike kwagqama wukuthi ngesikhathi bebiza uKhoza abaholi bale nhlangano bebembiza ngondunankulu, yize kungakayiwa okhethweni.\n\nPhakathi kwamagama asohlwini lokuqala olubizwa nge-Top 10 uKhoza,uNksz Thembi Msane, uMnuz Lwazi Ntombela, uNksz Londiwe Mkhwanazi, uMnuz Nhlanhla Buthelezi, uNksz Sbongile Khawula, uVerusca Fynn, uMnuz Reggie Ngcobo,uNksz Cebisile Shangase, uMnuz Nkosinathi Mthethwa.\n\nUNksz Moonsamy uthe abaholi babo bazimisele ukufunda okuningi njengoba beya eSishayamthetho.\n\nUKhoza uthe okubalulekile kubo wukuthi banqobe zonke izihlalo ezingu-80 eziseSishayamthetho.\n\nNgaphandle kwamagama abaholi abayishumi abasohlwini , kuphinde kwethulwa nabanye abasohlwini lwesifundazwe abayingxenye yabantu abazoya eSishayamthetho.\n\nKulesi sithangami kuphinde kwethulwa uMnuz Vukani Ndlovu ngokusemthethweni obedume ebuholini be-ANC Youth League ngenkathi ehola isigungu sesikhashana sesifundazwe esihlakazwe ngonyaka odlule.\n\nAbaholi baleli qembu bamile ekutheni bafuna ukusebenzisana nanoma yimuphi umbutho ozovumelana nabo ngemigomo ehambisana nokubuyiswa komhlaba ngaphandle kwesinxephezelo ukuthi uhlomulise bonke abantu bakuleli.\n\nUNksz Moonsamy uthe bangasebenzisana neFreedom Front Plus inqobo nje uma izimisele ukuvumelana nabo ngodaba lomhlaba, ivume ukuthi kumele ubesezandleni zabantu, hhayi zedlanzana.\n\nAbaholi baleli qembu abazange bacacise ukuthi banamalungu amangaki eKZN, bakhankasa nini nokuthi yiziphi izindlela abazisebenzisayo ukuxhumana nabantu njengoba bethi sebehlangane nabantu abaningi abampofu, abahola kancane, abasebenza ezindlini, abahlengikazi nabahlala emijondolo.\n\nBathi iKZN sebeyiphendule yabomvu njengoba bexhumana nabantu kuzona zonke izingxenye zesifundazwe.\n\nUKhoza uthe abantu baseKZN basetshenziswa ngamaqembu ezepolitiki njengethuluzi lokuvota ukuze kucebe idlanzana eliphila ntofontofo.\n\nUphinde wathi igama lesifundazwe selingcolile ezweni isidume njengendawo eyisizinda senkohlakalo ngenxa yomuzi kaMengameli Jacob Zuma owakhiwe ngoR246 million .')
class TestIOLCrawler(unittest.TestCase): def setUp(self): self.crawler = IOLCrawler() self.crawler.fetch_json_info = lambda x: self.doc_info self.maxDiff = None self.db = db self.db.drop_all() self.db.create_all() seed_db(db) def tearDown(self): self.db.session.remove() self.db.drop_all() def test_extract(self): self.doc_info = { "id": 1335083, "category": "motoring/industry-news", "title": "Cellphone crackdown - first busts", "published": "2012-07-05T12:10", "byline": "Murray Williams", "paragraphs": [ "The first cellphone confiscation has taken place in Cape Town, as the new law was enforced for the first time. ", "As of today, drivers who are caught talking on their phones while driving, without headsets or hands-free kits, will have their handsets confiscated by traffic officers. ", "The first driver caught this morning was Jean-Benoit Biyoko, a taxi driver. Traffic officers nabbed him in Long Street in the CBD. ", "The traffic service's Maxine Jordaan reported: “He didn't have a driving licence on him and he was taken to Gallows Hill traffic department. ", "“His cellphone, a Nokia E63, had a SIM card and memory card in it, which he kept, and he kept his pouch too. ", "<strong>“The gentleman was very co-operative and said he was sorry.”</strong> ", "Jordaan said Biyoko had been fined R500 for talking on his cellphone while driving and would be permitted to collect his phone 24 hours after it was confiscated - on Friday morning. ", "The new City law was to be enforced across the city this afternoon, with officers from the undercover 'Ghost Squad', and other officers, deployed on major commuter routes. ", "Officers' vehicles will carry special boxes, in which confiscated phones will be placed once they have been logged and sealed in protective pouches. They will then be stored in the traffic department's safe at Gallows Hill. ", "<strong>No fee is required to reclaim a confiscated phone.</strong> ", "The bylaw was introduced by safety and security Mayco member JP Smith, who has received praise from across the country for the action against drivers who continue to flout the law. ", "Smith said camera and video evidence would be used whenever possible to back up officers' observations. ", "“We're hoping that everybody will finally get the message, grab those hands-free kits and start using cellphones legally”, Smith said. ", "“We issue a minimum of 8000 fines a month for illegal cellphone use while driving. But it's not changing behaviour, so we must find a more powerful disincentive. ", "“Illegal cellphone use is classified as 'distracted driving' and is one of the four ost dangerous driving habits, with speeding, drinking and driving and not wearing seatbelts.” - Cape Argus ", '<a href="http://www.iol.co.za/newsletters" target="_blank">Motoring newsletter - click here to keep up to speed with the best in motoring</a>', "<hr>", ], "images": [ { "id": "iol-mot-pic-jul5-cell-phone-impoundment-1-1.1335082/2802609312", "credit": "INLSA", "caption": "Taxi driver Jean-Benoit Biyoko was caught talking on his phone while driving in Long Street. Picture: Henk Kruger", "url": "http://www.iol.co.za/polopoly_fs/iol-mot-pic-jul5-cell-phone-impoundment-1-1.1335082!/image/2802609312.jpg_gen/derivatives/box_300/2802609312.jpg", } ], "relatedStories": [ { "link": "http://www.iol.co.za/motoring/industry-news/cellphone-use-it-you-ll-lose-it-1.1333846", "title": "Cellphone: Use it, you'll lose it!", }, { "link": "http://www.iol.co.za/news/south-africa/kwazulu-natal/kzn-drivers-could-also-lose-phones-1.1333884", "title": "KZN drivers could also lose phones", }, ], "description": "Cape Town cops have begun confiscating cellphones from drivers not using hands-free kits.", } doc = Document() doc.url = "http://www.iol.co.za/motoring/industry-news/cellphone-crackdown-first-busts-1.1335083#.UzvU562SxWs" self.crawler.extract(doc, None) self.assertEqual(doc.title, "Cellphone crackdown - first busts") self.assertEqual( doc.summary, "Cape Town cops have begun confiscating cellphones from drivers not using hands-free kits." ) self.assertEqual(doc.published_at.strftime("%d %m %Y"), "05 07 2012") self.assertEqual(doc.author.name, "Murray Williams") self.assertEqual(doc.medium.name, "IOL") self.assertEqual( doc.text, u"The first cellphone confiscation has taken place in Cape Town, as the new law was enforced for the first time.\n\nAs of today, drivers who are caught talking on their phones while driving, without headsets or hands-free kits, will have their handsets confiscated by traffic officers.\n\nThe first driver caught this morning was Jean-Benoit Biyoko, a taxi driver. Traffic officers nabbed him in Long Street in the CBD.\n\nThe traffic service's Maxine Jordaan reported: \u201cHe didn't have a driving licence on him and he was taken to Gallows Hill traffic department.\n\n\u201cHis cellphone, a Nokia E63, had a SIM card and memory card in it, which he kept, and he kept his pouch too.\n\n\u201cThe gentleman was very co-operative and said he was sorry.\u201d\n\nJordaan said Biyoko had been fined R500 for talking on his cellphone while driving and would be permitted to collect his phone 24 hours after it was confiscated - on Friday morning.\n\nThe new City law was to be enforced across the city this afternoon, with officers from the undercover 'Ghost Squad', and other officers, deployed on major commuter routes.\n\nOfficers' vehicles will carry special boxes, in which confiscated phones will be placed once they have been logged and sealed in protective pouches. They will then be stored in the traffic department's safe at Gallows Hill.\n\nNo fee is required to reclaim a confiscated phone.\n\nThe bylaw was introduced by safety and security Mayco member JP Smith, who has received praise from across the country for the action against drivers who continue to flout the law.\n\nSmith said camera and video evidence would be used whenever possible to back up officers' observations.\n\n\u201cWe're hoping that everybody will finally get the message, grab those hands-free kits and start using cellphones legally\u201d, Smith said.\n\n\u201cWe issue a minimum of 8000 fines a month for illegal cellphone use while driving. But it's not changing behaviour, so we must find a more powerful disincentive.\n\n\u201cIllegal cellphone use is classified as 'distracted driving' and is one of the four ost dangerous driving habits, with speeding, drinking and driving and not wearing seatbelts.\u201d - Cape Argus\n\nMotoring newsletter - click here to keep up to speed with the best in motoring\n\n", ) def test_isolezwe(self): self.doc_info = { "id": 1667768, "category": "isolezwe", "title": "EzikaMalema zethule abazo eKZN", "published": "2014-03-28T09:57", "byline": "CELANI SIKHAKHANE noSIMPHIWE NGUBANE", "paragraphs": [ "<strong>CELANI SIKHAKHANE noSIMPHIWE NGUBANE</strong> ", "<strong>I</strong>-Economic Freedom Fighters (EFF) KwaZulu-Natal ifolosa ngabesifazane nentsha ohlwini lwayo lwamagama okuqala ayishumi abaholi abazoyimela esiShayamthetho ngemva kokhetho lukazwelonke oluzoba ngoMeyi 7. ", "Lokhu kugqame izolo ngenkathi i-EEF yethula abaholi bayo abasohlwini lokhetho esithangamini nabezindaba eThekwini. ", "Inxusa leqembu nokubhekwe ukuthi libe ngundunankulu wase-KZN uma i-EFF inqoba, nguMnuz Vusi Khoza. UKhoza uke waba yikhansela le-ANC eThekwini nonobhala weNFP esifundazweni. ", "UKhoza uthe uhla lwabo lumele lonke uhlobo lwabantu abakhona e-KZN ngokobulili, ukuxuba intsha nabadala. ", "UNksz Magdalene Moonsamy, obengumholi we-ANC Youth League nojutshwe ubuholi bukazwelonke esifundazweni, uthe iningi labaholi babo abazobamela eSishayamthetho banamakhono adingekayo futhi bayabethemba. ", "“Abanye baholi bethu banomlando wokusebenzela abantu kusuka kwi-ANC nakwezinye izinhlaka njengoKhoza okunguye osimele njengondunankulu wesifundazwe,” kusho uNksz Moonsamy. ", "Okufike kwagqama wukuthi ngesikhathi bebiza uKhoza abaholi bale nhlangano bebembiza ngondunankulu, yize kungakayiwa okhethweni. ", "Phakathi kwamagama asohlwini lokuqala olubizwa nge-<em>Top 10</em> uKhoza,uNksz Thembi Msane, uMnuz Lwazi Ntombela, uNksz Londiwe Mkhwanazi, uMnuz Nhlanhla Buthelezi, uNksz Sbongile Khawula, uVerusca Fynn, uMnuz Reggie Ngcobo,uNksz Cebisile Shangase, uMnuz Nkosinathi Mthethwa. ", "UNksz Moonsamy uthe abaholi babo bazimisele ukufunda okuningi njengoba beya eSishayamthetho. ", "UKhoza uthe okubalulekile kubo wukuthi banqobe zonke izihlalo ezingu-80 eziseSishayamthetho. ", "Ngaphandle kwamagama abaholi abayishumi abasohlwini , kuphinde kwethulwa nabanye abasohlwini lwesifundazwe abayingxenye yabantu abazoya eSishayamthetho. ", "Kulesi sithangami kuphinde kwethulwa uMnuz Vukani Ndlovu ngokusemthethweni obedume ebuholini be-ANC Youth League ngenkathi ehola isigungu sesikhashana sesifundazwe esihlakazwe ngonyaka odlule. ", "Abaholi baleli qembu bamile ekutheni bafuna ukusebenzisana nanoma yimuphi umbutho ozovumelana nabo ngemigomo ehambisana nokubuyiswa komhlaba ngaphandle kwesinxephezelo ukuthi uhlomulise bonke abantu bakuleli. ", "UNksz Moonsamy uthe bangasebenzisana neFreedom Front Plus inqobo nje uma izimisele ukuvumelana nabo ngodaba lomhlaba, ivume ukuthi kumele ubesezandleni zabantu, hhayi zedlanzana. ", "Abaholi baleli qembu abazange bacacise ukuthi banamalungu amangaki eKZN, bakhankasa nini nokuthi yiziphi izindlela abazisebenzisayo ukuxhumana nabantu njengoba bethi sebehlangane nabantu abaningi abampofu, abahola kancane, abasebenza ezindlini, abahlengikazi nabahlala emijondolo. ", "Bathi iKZN sebeyiphendule yabomvu njengoba bexhumana nabantu kuzona zonke izingxenye zesifundazwe. ", "UKhoza uthe abantu baseKZN basetshenziswa ngamaqembu ezepolitiki njengethuluzi lokuvota ukuze kucebe idlanzana eliphila ntofontofo. ", "Uphinde wathi igama lesifundazwe selingcolile ezweni isidume njengendawo eyisizinda senkohlakalo ngenxa yomuzi kaMengameli Jacob Zuma owakhiwe ngoR246 million . ", ], "images": [ { "id": "copy-of-no-no-moonsamyy0-1.1667766/3851252182", "credit": "INL SA", "caption": "UNKSZ Magdalene Moonsamy, osuka kwi-ANC Youth League, ujutshwe yisigungu se-EFF kuzwelonke ukuthi eze KwaZulu-Natal", "url": "http://www.iol.co.za/polopoly_fs/copy-of-no-no-moonsamyy0-1.1667766!/image/3851252182.jpg_gen/derivatives/box_300/3851252182.jpg", }, { "id": "copy-of-no-no-khoza0-1.1667767/4259951999", "credit": "INLSA", "caption": "UMNUZ Vusi Khoza, osuka kwi-ANC neNational Freedom Party, i-Economic Freedom Fighters imthwele ngeqoma ukuthi abe ngundunankulu eKZN", "url": "http://www.iol.co.za/polopoly_fs/copy-of-no-no-khoza0-1.1667767!/image/4259951999.jpg_gen/derivatives/box_300/4259951999.jpg", }, ], } doc = Document() doc.url = "http://www.iol.co.za/isolezwe/ezikamalema-zethule-abazo-ekzn-1.1667768#.UzvUR62SxWv" self.crawler.extract(doc, None) self.assertEqual(doc.title, "EzikaMalema zethule abazo eKZN") self.assertEqual(doc.summary, None) self.assertEqual(doc.published_at.strftime("%d %m %Y"), "28 03 2014") self.assertEqual(doc.author.name, "CELANI SIKHAKHANE noSIMPHIWE NGUBANE") self.assertEqual(doc.medium.name, "Isolezwe") self.assertEqual( doc.text, u"CELANI SIKHAKHANE noSIMPHIWE NGUBANE\n\nI-Economic Freedom Fighters (EFF) KwaZulu-Natal ifolosa ngabesifazane nentsha ohlwini lwayo lwamagama okuqala ayishumi abaholi abazoyimela esiShayamthetho ngemva kokhetho lukazwelonke oluzoba ngoMeyi 7.\n\nLokhu kugqame izolo ngenkathi i-EEF yethula abaholi bayo abasohlwini lokhetho esithangamini nabezindaba eThekwini.\n\nInxusa leqembu nokubhekwe ukuthi libe ngundunankulu wase-KZN uma i-EFF inqoba, nguMnuz Vusi Khoza. UKhoza uke waba yikhansela le-ANC eThekwini nonobhala weNFP esifundazweni.\n\nUKhoza uthe uhla lwabo lumele lonke uhlobo lwabantu abakhona e-KZN ngokobulili, ukuxuba intsha nabadala.\n\nUNksz Magdalene Moonsamy, obengumholi we-ANC Youth League nojutshwe ubuholi bukazwelonke esifundazweni, uthe iningi labaholi babo abazobamela eSishayamthetho banamakhono adingekayo futhi bayabethemba.\n\n\u201cAbanye baholi bethu banomlando wokusebenzela abantu kusuka kwi-ANC nakwezinye izinhlaka njengoKhoza okunguye osimele njengondunankulu wesifundazwe,\u201d kusho uNksz Moonsamy.\n\nOkufike kwagqama wukuthi ngesikhathi bebiza uKhoza abaholi bale nhlangano bebembiza ngondunankulu, yize kungakayiwa okhethweni.\n\nPhakathi kwamagama asohlwini lokuqala olubizwa nge-Top 10 uKhoza,uNksz Thembi Msane, uMnuz Lwazi Ntombela, uNksz Londiwe Mkhwanazi, uMnuz Nhlanhla Buthelezi, uNksz Sbongile Khawula, uVerusca Fynn, uMnuz Reggie Ngcobo,uNksz Cebisile Shangase, uMnuz Nkosinathi Mthethwa.\n\nUNksz Moonsamy uthe abaholi babo bazimisele ukufunda okuningi njengoba beya eSishayamthetho.\n\nUKhoza uthe okubalulekile kubo wukuthi banqobe zonke izihlalo ezingu-80 eziseSishayamthetho.\n\nNgaphandle kwamagama abaholi abayishumi abasohlwini , kuphinde kwethulwa nabanye abasohlwini lwesifundazwe abayingxenye yabantu abazoya eSishayamthetho.\n\nKulesi sithangami kuphinde kwethulwa uMnuz Vukani Ndlovu ngokusemthethweni obedume ebuholini be-ANC Youth League ngenkathi ehola isigungu sesikhashana sesifundazwe esihlakazwe ngonyaka odlule.\n\nAbaholi baleli qembu bamile ekutheni bafuna ukusebenzisana nanoma yimuphi umbutho ozovumelana nabo ngemigomo ehambisana nokubuyiswa komhlaba ngaphandle kwesinxephezelo ukuthi uhlomulise bonke abantu bakuleli.\n\nUNksz Moonsamy uthe bangasebenzisana neFreedom Front Plus inqobo nje uma izimisele ukuvumelana nabo ngodaba lomhlaba, ivume ukuthi kumele ubesezandleni zabantu, hhayi zedlanzana.\n\nAbaholi baleli qembu abazange bacacise ukuthi banamalungu amangaki eKZN, bakhankasa nini nokuthi yiziphi izindlela abazisebenzisayo ukuxhumana nabantu njengoba bethi sebehlangane nabantu abaningi abampofu, abahola kancane, abasebenza ezindlini, abahlengikazi nabahlala emijondolo.\n\nBathi iKZN sebeyiphendule yabomvu njengoba bexhumana nabantu kuzona zonke izingxenye zesifundazwe.\n\nUKhoza uthe abantu baseKZN basetshenziswa ngamaqembu ezepolitiki njengethuluzi lokuvota ukuze kucebe idlanzana eliphila ntofontofo.\n\nUphinde wathi igama lesifundazwe selingcolile ezweni isidume njengendawo eyisizinda senkohlakalo ngenxa yomuzi kaMengameli Jacob Zuma owakhiwe ngoR246 million .", )