'Tests the {% page_attribute %} templatetag, using current page, lookup by pk/dict/reverse_id and passing a Page object.'

def test_page_attribute(self):

    t = (((((((((((((((((((((((u'{%    load    cms_tags    %}' + u'|{%    page_attribute    title    %}') + u'{%    page_attribute    title    as    title    %}') + u'|{{    title    }}') + u'|{%    page_attribute    title    ') + str(self.test_page2.pk)) + '    %}') + u'{%    page_attribute    title    ') + str(self.test_page2.pk)) + '    as    title    %}') + u'|{{    title    }}') + u'|{%    page_attribute    title    test_dict    %}') + u'{%    page_attribute    title    test_dict    as    title    %}') + u'|{{    title    }}') + u'|{%    page_attribute    slug    "') + str(self.test_page2.reverse_id)) + '"    %}') + u'{%    page_attribute    slug    "') + str(self.test_page2.reverse_id)) + '"    as    slug    %}') + u'|{{    slug    }}') + u'|{%    page_attribute    slug    test_page    %}') + u'{%    page_attribute    slug    test_page    as    slug    %}') + u'|{{    slug    }}')
    r = self.render(self.test_page, template=t, context_vars={'test_page': self.test_page2, 'test_dict': {'pk': self.test_page2.pk}})
    self.assertEqual(r, ((((u'|' + self.test_data['title']) * 2) + ((u'|' + self.test_data2['title']) * 4)) + ((u'|' + self.test_data2['slug']) * 4)))
