'Test setup.'

def setUp(self):

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