Exemplo n.º 1
0
 def test_requires_login(self):
     """ Tests if projects list page is rendered properly. """
     company = CompanyF.create()
     url = reverse('fcore_projects_list',
                   kwargs={'company_slug': company.slug})
     response = self.client.get(url)
     self.assertEqual(response.status_code, 302)
Exemplo n.º 2
0
 def test_renders_template(self):
     """ Tests if projects list page is rendered properly. """
     user = self.login_user()
     company = CompanyF.create()
     user.fortuitusprofile.company = company
     user.fortuitusprofile.save()
     url = reverse('fcore_projects_list',
                   kwargs={'company_slug': company.slug})
     response = self.client.get(url)
     self.assertEqual(response.status_code, 200)
     self.assertTemplateUsed('fortuitus/fcore/projects_list.html')