Exemple #1
0
	def test_ropa_listar_returns_correct_html(self):
		request = HttpRequest()
		response = listar(request)
		self.assertTrue(response.content.startswith(b'<div>'))
		self.assertIn(b'<h1>Lista de Prendas</h1>',response.content)
		self.assertIn(b'<button onclick="window.location=\'/ropa/nuevo/\'">Agregar Prenda</button>',response.content)
		self.assertTrue(response.content.endswith(b'</div>'))
Exemple #2
0
 def test_ropa_listar_returns_correct_html(self):
     request = HttpRequest()
     response = listar(request)
     self.assertIn(b'<html>', response.content)
     self.assertIn(b'<h1>Lista de Prendas</h1>', response.content)
     self.assertIn(
         b'>Agregar Prenda<', response.content)
     self.assertTrue(response.content.endswith(b'</html>'))