# Django
from django.contrib.auth.models import User, Group
from django.core.urlresolvers import reverse
from django.test import TestCase

class IOTDChooseTest(TestCase):
    def test_page_exists(self):
        response = self.client.get(reverse('iotd_choose'))
        self.assertEqual(response.status_code, 302)

    def test_page_accessible_by_iotd_staff(self):
        user = User.objects.create_user('test', 'test@test.com', 'password')
        group = Group.objects.create(name = 'IOTD_Staff')
        user.groups.add(group)

        self.client.login(username = 'test', password = 'password')

        response = self.client.get(reverse('iotd_choose'))
        self.assertEqual(response.status_code, 200)

@@ -435,16 +435,197 @@
 sword')%0A
+        self.client.login(username = 'test', password = 'password')%0A        response = self.client.get(reverse('iotd_choose'))%0A        self.assertEqual(response.status_code, 403)%0A%0A%0A
         
@@ -709,78 +709,8 @@
 up)%0A
-%0A        self.client.login(username = 'test', password = 'password')%0A%0A
     

Add assert for non IOTD_Staff accessing iotd_choose