예제 #1
0
 def test_fragment_admin_view_exists(self):
     Fragment.objects.all().delete()
     self.assert_counts([0], [Fragment])
     fragment1 = Fragment(
         title='fragment1',
     )
     fragment1.save()
     self.assert_counts([1], [Fragment])
     login_as_admin()
     response = self.client.get('/admin/fraggle/fragment/%s' 
         % str(fragment1.id))
     self.assert_code(response, 302)
     response = self.client.get('/admin/fraggle/fragment/%s/' 
         % str(fragment1.id))
     self.assert_code(response, 200)
예제 #2
0
 def test_admin_exists(self):
     login_as_admin()
     response = self.client.get('/admin/fraggle/fragment/')
     self.assert_code(response, 200)