def test_paginapruebavariable(self): # Build a request object passing the URI path to be tested. # You can also pass headers, query arguments etc. request = webapp2.Request.blank('/') # Get a response for that request. response = request.get_response(pasarelatest.aplicacion()) # Let's check if the response is correct. # self.assertEqual(response.status_int, 200) self.assertTrue('<a class="uk-button-danger" href="crearempresa"> Crear Empresa </a>' in response.body)
def test_listarempresas(self): # Build a request object passing the URI path to be tested. # You can also pass headers, query arguments etc. request = webapp2.Request.blank('/listarempresas') # Get a response for that request. response = request.get_response(pasarelatest.aplicacion()) # Let's check if the response is correct. # self.assertEqual(response.status_int, 200) self.assertTrue('<td>' in response.body)
def test_crearusuario(self): # Build a request object passing the URI path to be tested. # You can also pass headers, query arguments etc. request = webapp2.Request.blank('/crearusuario') # Get a response for that request. response = request.get_response(pasarelatest.aplicacion()) # Let's check if the response is correct. # self.assertEqual(response.status_int, 200) self.assertTrue('<input name="nombreUsuario" type="text" placeholder="Nombre Usuario">' in response.body)
def test_modificacion(self): request = webapp2.Request.blank('/modificacion') response = request.get_response(pasarelatest.aplicacion()) (response.body).should.contain('Modificacion para CI')
def test_prueba_con_parametro(self): request = webapp2.Request.blank('/prueba/valorprueba') response = request.get_response(pasarelatest.aplicacion()) (response.body).should.contain('valorprueba')