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

Commit

Permalink
Bug 1173352 - Some import modernization in the wiki test modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Jun 16, 2015
1 parent db57d31 commit ca842cf
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 32 deletions.
20 changes: 9 additions & 11 deletions kuma/wiki/tests/test_content.py
Expand Up @@ -10,17 +10,15 @@
from kuma.core.tests import KumaTestCase
from kuma.users.tests import UserTestCase
import kuma.wiki.content
from kuma.wiki.content import (CodeSyntaxFilter,
SectionTOCFilter, SectionIDFilter,
H2TOCFilter, H3TOCFilter,
SECTION_TAGS, get_seo_description,
get_content_sections, extract_css_classnames,
extract_html_attributes,
extract_kumascript_macro_names)
from kuma.wiki.constants import ALLOWED_TAGS, ALLOWED_ATTRIBUTES
from kuma.wiki.models import Document
from kuma.wiki.tests import normalize_html, doc_rev, document
from kuma.wiki.helpers import bugize_text
from ..constants import ALLOWED_TAGS, ALLOWED_ATTRIBUTES
from ..content import (CodeSyntaxFilter, SectionTOCFilter, SectionIDFilter,
H2TOCFilter, H3TOCFilter, SECTION_TAGS,
get_seo_description, get_content_sections,
extract_css_classnames, extract_html_attributes,
extract_kumascript_macro_names)
from ..helpers import bugize_text
from ..models import Document
from . import normalize_html, doc_rev, document


class ContentSectionToolTests(UserTestCase):
Expand Down
4 changes: 2 additions & 2 deletions kuma/wiki/tests/test_events.py
@@ -1,8 +1,8 @@
from nose.tools import eq_

from kuma.users.tests import UserTestCase
from kuma.wiki.events import context_dict
from kuma.wiki.tests import WikiTestCase, revision
from . import WikiTestCase, revision
from ..events import context_dict


class NotificationEmailTests(UserTestCase, WikiTestCase):
Expand Down
5 changes: 2 additions & 3 deletions kuma/wiki/tests/test_feeds.py
Expand Up @@ -7,10 +7,9 @@
from nose.tools import eq_, ok_
from pyquery import PyQuery as pq

from kuma.users.tests import UserTestCase
from kuma.wiki.tests import (WikiTestCase, document, revision,
make_translation, wait_add_rev)
from kuma.core.urlresolvers import reverse
from kuma.users.tests import UserTestCase
from . import WikiTestCase, document, revision, make_translation, wait_add_rev


class FeedTests(UserTestCase, WikiTestCase):
Expand Down
4 changes: 2 additions & 2 deletions kuma/wiki/tests/test_forms.py
Expand Up @@ -2,8 +2,8 @@
from nose.plugins.attrib import attr

from kuma.users.tests import UserTestCase
from kuma.wiki.forms import RevisionForm, RevisionValidationForm, TreeMoveForm
from kuma.wiki.tests import doc_rev, normalize_html
from ..forms import RevisionForm, RevisionValidationForm, TreeMoveForm
from ..tests import doc_rev, normalize_html


class FormEditorSafetyFilterTests(UserTestCase):
Expand Down
8 changes: 4 additions & 4 deletions kuma/wiki/tests/test_helpers.py
Expand Up @@ -5,10 +5,10 @@

from kuma.core.cache import memcache
from kuma.users.tests import UserTestCase
from kuma.wiki.helpers import (absolutify, document_zone_management_links,
revisions_unified_diff, tojson)
from kuma.wiki.models import DocumentZone
from kuma.wiki.tests import revision, WikiTestCase
from . import revision, WikiTestCase
from ..helpers import (absolutify, document_zone_management_links,
revisions_unified_diff, tojson)
from ..models import DocumentZone


class HelpTests(WikiTestCase):
Expand Down
11 changes: 5 additions & 6 deletions kuma/wiki/tests/test_templates.py
Expand Up @@ -22,13 +22,12 @@

from kuma.core.tests import SkippedTestCase, post, get
from kuma.core.urlresolvers import reverse
from kuma.wiki.events import EditDocumentEvent
from kuma.wiki.constants import REDIRECT_CONTENT, TEMPLATE_TITLE_PREFIX
from kuma.wiki.models import (Document, Revision, HelpfulVote,
DocumentTag)
from kuma.wiki.tests import (WikiTestCase, document, revision,
new_document_data, create_topical_parents_docs)
from kuma.users.tests import UserTestCase
from ..events import EditDocumentEvent
from ..constants import REDIRECT_CONTENT, TEMPLATE_TITLE_PREFIX
from ..models import Document, Revision, HelpfulVote, DocumentTag
from . import (WikiTestCase, document, revision, new_document_data,
create_topical_parents_docs)


DOCUMENT_EDITED_EMAIL_CONTENT = """
Expand Down
8 changes: 4 additions & 4 deletions kuma/wiki/tests/test_views.py
Expand Up @@ -33,12 +33,12 @@

from ..content import get_seo_description
from ..events import EditDocumentEvent
from ..forms import MIDAIR_COLLISION
from ..models import (Document, Revision, RevisionIP, DocumentZone,
DocumentTag, DocumentDeletionLog)
from ..tests import (doc_rev, document, new_document_data, revision,
normalize_html, create_template_test_users,
make_translation, WikiTestCase, FakeResponse)
from ..forms import MIDAIR_COLLISION
from . import (doc_rev, document, new_document_data, revision,
normalize_html, create_template_test_users,
make_translation, WikiTestCase, FakeResponse)


class RedirectTests(UserTestCase, WikiTestCase):
Expand Down

0 comments on commit ca842cf

Please sign in to comment.