Example #1
0
 def test_SearchTwoFields(self):
     personas = Persona.search ('Espa Tene')
     self.assertEqual (personas[0], Persona.objects.get (pk = 2))
     self.assertEqual (1, len (personas))
Example #2
0
 def test_SearchTel(self):
     personas = Persona.search ('922123456')
     self.assertEqual (personas[0], Persona.objects.get (pk = 1))
     self.assertEqual (1, len (personas))
Example #3
0
 def test_SearchPlaceOfBirth(self):
     personas = Persona.search ('Tenerife')
     self.assertEqual (personas[0], Persona.objects.get (pk = 2))
     self.assertEqual (1, len (personas))
Example #4
0
 def test_SearchNation(self):
     personas = Persona.search ('Espa')
     self.assertEqual (personas[0], Persona.objects.get (pk = 1))
     self.assertEqual (personas[1], Persona.objects.get (pk = 2))
     self.assertEqual (2, len (personas))
Example #5
0
 def test_SearchIDDocument(self):
     personas = Persona.search ('123123123J')
     self.assertEqual (personas[0], Persona.objects.get (pk = 1))
     self.assertEqual (1, len (personas))
Example #6
0
 def test_SearchSurname(self):
     personas = Persona.search ('apellido')
     self.assertEqual (personas[0], Persona.objects.get (pk = 1))
     self.assertEqual (personas[1], Persona.objects.get (pk = 2))
     self.assertEqual (2, len (personas))
Example #7
0
 def test_SearchName(self):
     personas = Persona.search ('profesor1')
     self.assertEqual (personas[0], Persona.objects.get (pk = 1))
     self.assertEqual (1, len (personas))