'Test setup.'

def setUp(self):

    opts = Article._meta
    add_user = User.objects.get(username=u'adduser')
    add_user.user_permissions.add(get_perm(Article, get_permission_codename(u'add', opts)))
    change_user = User.objects.get(username=u'changeuser')
    change_user.user_permissions.add(get_perm(Article, get_permission_codename(u'change', opts)))
    delete_user = User.objects.get(username=u'deleteuser')
    delete_user.user_permissions.add(get_perm(Article, get_permission_codename(u'delete', opts)))
    delete_user.user_permissions.add(get_perm(Section, get_permission_codename(u'delete', Section._meta)))
    self.super_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'super', u'password': u'secret'}
    self.super_email_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'super@example.com', u'password': u'secret'}
    self.super_email_bad_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'super@example.com', u'password': u'notsecret'}
    self.adduser_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'adduser', u'password': u'secret'}
    self.changeuser_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'changeuser', u'password': u'secret'}
    self.deleteuser_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'deleteuser', u'password': u'secret'}
    self.joepublic_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'username': u'joepublic', u'password': u'secret'}
    self.no_username_login = {REDIRECT_FIELD_NAME: u'/test_admin/admin/', LOGIN_FORM_KEY: 1, u'password': u'secret'}
