Exemple #1
0
    def test_cascade(self):
        d1, _, _ = doc_rev_parser('one ', title='Template:D1')
        d2, _, _ = doc_rev_parser('[[T:D1]] two', title='Template:D2')
        d3, _, _ = doc_rev_parser('[[T:D1]] [[T:D2]] three', title='D3')

        eq_(self._clean(d3), u'one one two three')

        revision(document=d1, content='ONE', is_approved=True, save=True)
        render_document_cascade(d1)

        eq_(self._clean(d1), u'ONE')
        eq_(self._clean(d2), u'ONE two')
        eq_(self._clean(d3), u'ONE ONE two three')
Exemple #2
0
    def test_cascade(self):
        d1, _, _ = doc_rev_parser('one ', title='Template:D1')
        d2, _, _ = doc_rev_parser('[[T:D1]] two', title='Template:D2')
        d3, _, _ = doc_rev_parser('[[T:D1]] [[T:D2]] three', title='D3')

        eq_(self._clean(d3), u'one one two three')

        revision(document=d1, content='ONE', is_approved=True, save=True)
        render_document_cascade(d1)

        eq_(self._clean(d1), u'ONE')
        eq_(self._clean(d2), u'ONE two')
        eq_(self._clean(d3), u'ONE ONE two three')
Exemple #3
0
    def test_cascade(self):
        d1, _, _ = doc_rev_parser("one ", title="Template:D1")
        d2, _, _ = doc_rev_parser("[[T:D1]] two", title="Template:D2")
        d3, _, _ = doc_rev_parser("[[T:D1]] [[T:D2]] three", title="D3")

        eq_(self._clean(d3), u"one one two three")

        revision(document=d1, content="ONE", is_approved=True, save=True)
        render_document_cascade(d1)

        eq_(self._clean(d1), u"ONE")
        eq_(self._clean(d2), u"ONE two")
        eq_(self._clean(d3), u"ONE ONE two three")
    def test_cascade(self):
        d1, _, _ = doc_rev_parser(
            'one ', title=TEMPLATE_TITLE_PREFIX + 'D1', category=TEMPLATES_CATEGORY)
        d2, _, _ = doc_rev_parser(
            '[[T:D1]] two', title=TEMPLATE_TITLE_PREFIX + 'D2', category=TEMPLATES_CATEGORY)
        d3, _, _ = doc_rev_parser('[[T:D1]] [[T:D2]] three', title='D3')

        eq_(self._clean(d3), u'one one two three')

        revision(document=d1, content='ONE', is_approved=True, save=True)
        render_document_cascade(d1)

        eq_(self._clean(d1), u'ONE')
        eq_(self._clean(d2), u'ONE two')
        eq_(self._clean(d3), u'ONE ONE two three')
Exemple #5
0
    def test_cascade(self):
        d1, _, _ = doc_rev_parser('one ',
                                  title=TEMPLATE_TITLE_PREFIX + 'D1',
                                  category=TEMPLATES_CATEGORY)
        d2, _, _ = doc_rev_parser('[[T:D1]] two',
                                  title=TEMPLATE_TITLE_PREFIX + 'D2',
                                  category=TEMPLATES_CATEGORY)
        d3, _, _ = doc_rev_parser('[[T:D1]] [[T:D2]] three', title='D3')

        eq_(self._clean(d3), u'one one two three')

        revision(document=d1, content='ONE', is_approved=True, save=True)
        render_document_cascade(d1)

        eq_(self._clean(d1), u'ONE')
        eq_(self._clean(d2), u'ONE two')
        eq_(self._clean(d3), u'ONE ONE two three')
Exemple #6
0
    def test_cascade(self):
        d1, _, _ = doc_rev_parser("one ",
                                  title=TEMPLATE_TITLE_PREFIX + "D1",
                                  category=TEMPLATES_CATEGORY)
        d2, _, _ = doc_rev_parser("[[T:D1]] two",
                                  title=TEMPLATE_TITLE_PREFIX + "D2",
                                  category=TEMPLATES_CATEGORY)
        d3, _, _ = doc_rev_parser("[[T:D1]] [[T:D2]] three", title="D3")

        eq_(self._clean(d3), "one one two three")

        RevisionFactory(document=d1, content="ONE", is_approved=True)
        render_document_cascade(d1.id)

        eq_(self._clean(d1), "ONE")
        eq_(self._clean(d2), "ONE two")
        eq_(self._clean(d3), "ONE ONE two three")