def test_crisis2(self):
     # Test if person kind is on page in format designated in template
     request_factory = RequestFactory()
     request = request_factory.get('/crisix/crises/haiear')
     response = crises(request, 'haiear')
     htmlstring = response.content
     self.assertNotEqual(htmlstring.find('<li>Natural Disaster</li>'),-1)
 def test_crisis3(self):
     # Test if person name is on page in format designated in template
     request_factory = RequestFactory()
     request = request_factory.get('/crisix/crises/haiear')
     response = crises(request, 'haiear')
     htmlstring = response.content
     self.assertNotEqual(htmlstring.find('<h1 class="main-focus">2010 Haiti Earthquake</h1>'),-1)
 def test_crisis4(self):
     # Test if related objects are on page in format designated in template
     request_factory = RequestFactory()
     request = request_factory.get('/crisix/crises/haiear')
     response = crises(request, 'haiear')
     htmlstring = response.content
     self.assertNotEqual(htmlstring.find('<li><a href="/crisix/organizations/whorgn/">World Health Organization</a></li>'),-1)
     self.assertNotEqual(htmlstring.find('<li><a href="/crisix/people/brobma/">Barack Obama</a></li>'),-1)
 def test_crisis1(self):
     # Test if the instance page is accessible
     request_factory = RequestFactory()
     request = request_factory.get('/crisix/crises/haiear')
     response = crises(request, 'haiear')
     self.assertEqual(response.status_code, 200)