def test_remover_links_basico(self): tweet = Tweet() tweet.id = 19821138922184705 tweet.texto = "FOTO CURIOSA: ¿Será culpa del arquitecto? ¿Tu que opinas?" \ + " http://losgraficos.com/fotos-imagenes-graciosas-1381.html #fb" tweet.favoritos = 5 tweet.retweets = 26 tweet.es_humor = 1 tweet.cuenta = 174450359 self.assertEqual(remover_links(tweet.texto), "FOTO CURIOSA: ¿Será culpa del arquitecto? ¿Tu que opinas? #fb", "El texto sin el link no es el esperado")
def test_remover_dos_links(self): tweet = Tweet() tweet.id = 301726981937057792 tweet.texto = "RT @laseptimabutaca: Trailer de \"Rápido y Furioso 6\" que se estrenará en mayo de este año" \ + " 2013 http://t.co/tklxfuFx http://t.co/c5aS4hw2" tweet.favoritos = 0 tweet.retweets = 71 tweet.es_humor = 1 tweet.cuenta = 142482558 self.assertEqual(remover_links(tweet.texto), "RT @laseptimabutaca: Trailer de \"Rápido y Furioso 6\" que se estrenará en mayo de este año" \ + " 2013 ", "El texto sin los links no es el esperado")
def test_remover_links_basico(self): tweet = Tweet() tweet.id = 19821138922184705 tweet.texto = "FOTO CURIOSA: ¿Será culpa del arquitecto? ¿Tu que opinas?" \ + " http://losgraficos.com/fotos-imagenes-graciosas-1381.html #fb" tweet.favoritos = 5 tweet.retweets = 26 tweet.es_humor = 1 tweet.cuenta = 174450359 self.assertEqual( remover_links(tweet.texto), "FOTO CURIOSA: ¿Será culpa del arquitecto? ¿Tu que opinas? #fb", "El texto sin el link no es el esperado")