예제 #1
0
def home():
    
    respuesta=''
    if request.method == 'POST':
        respuesta = SubPalindroma(request.form['cadena'])
        
    return render_template("index.html", respuesta={'cadena':respuesta})
예제 #2
0
 def test_SubcadenaPalindroa_Pasa(self):
     self.assertEqual(SubPalindroma('irerq'), 'rer')
예제 #3
0
 def test_SubcadenaPalindroa_7Pasa(self):
     self.assertNotEqual(SubPalindroma('aAaaa'), 'aaa')
예제 #4
0
 def test_SubcadenaPalindroa_6Pasa(self):
     self.assertNotEqual(SubPalindroma('Aa'), 'a')
예제 #5
0
 def test_SubcadenaPalindroa_5Pasa(self):
     self.assertNotEqual(SubPalindroma('aA'), 'A')
예제 #6
0
 def test_SubcadenaPalindroa_4NoPasa(self):
     self.assertNotEqual(SubPalindroma('qwer1235321fr'), '0')
예제 #7
0
 def test_SubcadenaPalindroa_3Pasa(self):
     self.assertEqual(SubPalindroma('qwer1235321fr'), 'r1235321r')
예제 #8
0
 def test_SubcadenaPalindroa_2Pasa(self):
     self.assertEqual(SubPalindroma('47ana ojo ana f47'), '4ana ojo ana4')