'kumaediting: everyone, kumabanned: testuser2'

def test_banned_users(self):

    self.kumaediting_flag.everyone = True
    self.kumaediting_flag.save()
    kumabanned = Flag.objects.create(name='kumabanned')
    kumabanned.users = self.user_model.objects.filter(username='testuser2')
    kumabanned.save()
    self.client.login(username='testuser', password='testpass')
    resp = self.client.get(self.edit_url)
    eq_(200, resp.status_code)
    self.client.logout()
    self.client.login(username='testuser2', password='testpass')
    resp = self.client.get(self.edit_url)
    eq_(403, resp.status_code)
    ok_(('Your    profile    has    been    banned    from    making    edits.' in resp.content))
    kumabanned.users = self.user_model.objects.filter((Q(username='testuser2') | Q(username='testuser01')))
    kumabanned.save()
    self.client.login(username='testuser', password='testpass')
    resp = self.client.get(self.edit_url)
    eq_(200, resp.status_code)
    self.client.logout()
    self.client.login(username='testuser2', password='testpass')
    resp = self.client.get(self.edit_url)
    eq_(403, resp.status_code)
    ok_(('Your    profile    has    been    banned    from    making    edits.' in resp.content))
    self.client.login(username='testuser01', password='testpass')
    resp = self.client.get(self.edit_url)
    eq_(403, resp.status_code)
    ok_(('Your    profile    has    been    banned    from    making    edits.' in resp.content))
