Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1419419: Drop Flag setup from test
Browse files Browse the repository at this point in the history
The SPAM_SUBMISSIONS_FLAG doesn't control the display of the "Submit as
Spam" flag. Instead, it is the permission to create a
RevisionAkismetSubmission, which the admin user already has.
  • Loading branch information
jwhitlock committed Apr 26, 2018
1 parent e524e6c commit 0a6478e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions kuma/dashboards/tests/test_views.py
Expand Up @@ -6,15 +6,13 @@
from django.contrib.auth.models import Permission
from django.core.exceptions import ImproperlyConfigured
from pyquery import PyQuery as pq
from waffle.models import Flag, Switch
from waffle.models import Switch

from kuma.core.tests import (assert_no_cache_header,
assert_shared_cache_header, eq_, ok_)
from kuma.core.urlresolvers import reverse
from kuma.core.utils import to_html, urlparams
from kuma.dashboards.forms import RevisionDashboardForm
from kuma.spam.constants import SPAM_SUBMISSIONS_FLAG
from kuma.users.models import User
from kuma.users.tests import create_document, SampleRevisionsMixin, UserTestCase
from kuma.wiki.models import DocumentSpamAttempt, RevisionAkismetSubmission

Expand Down Expand Up @@ -81,8 +79,6 @@ def test_spam_submission_buttons(self):
spam_report_button = page.find('.spam-ham-button')
eq_(spam_report_button, [])

flag = Flag.objects.create(name=SPAM_SUBMISSIONS_FLAG)
flag.users.add(User.objects.get(username='admin'))
self.client.login(username='admin', password='testpass')
url = reverse('dashboards.revisions', locale='en-US')
response = self.client.get(url)
Expand Down

0 comments on commit 0a6478e

Please sign in to comment.