def setUp(self):
     test_template = tests.create_template(
         content = "{% lucidTag page_counter %}"
     )
     # Create the test pages defined in content_test_utils.py
     # assign the test template to all pages
     tests.create_pages(tests.TEST_PAGES, template=test_template)
    def setUp(self):
        """
        Create a clean page table.
        """
        Page.objects.all().delete() # Delete all existins pages

        self.template = tests.create_template(
            content = "{% lucidTag main_menu %}"
        )
    def setUp(self):
        self.fake_context = get_fake_context()
        Page.objects.all().delete() # Delete all existins pages

        self.template = tests.create_template(content = TEST_TEMPLATE)

        # Create the test pages defined in content_test_utils.py
        # assign the test template to all pages
        tests.create_pages(
            tests.TEST_PAGES,
            template=self.template,
        )
    def setUp(self):
        """
        Create a clean page table.
        """
        Page.objects.all().delete() # Delete all existins pages

        self.template = tests.create_template(
            content = "{% lucidTag back_links %}"
        )

        # Create the test pages defined in content_test_utils.py
        # assign the test template to all pages
        tests.create_pages(tests.TEST_PAGES, template=self.template)
    def setUp(self):
        """
        Create a clean page table.
        Create the test pages with a test template and stylesheet.
        """
        Page.objects.all().delete() # Delete all existins pages

        self.template = tests.create_template(
            content = "{% lucidTag page_style %}"
        )
        self.style = tests.create_stylesheet(
            name = "TestStyle", content = TEST_STYLE_CONTENT,
        )

        # Create the test pages defined in content_test_utils.py
        # assign the test template and stylesheet to all pages
        tests.create_pages(
            tests.TEST_PAGES,
            template=self.template,
            style = self.style,
        )
    def setUp(self):
        self.login("superuser") # login client as superuser

        Page.objects.all().delete() # Delete all existins pages

        self.template = tests.create_template(
            content = (
                "<!-- page_messages -->\n"
                "{{ PAGE.content }}"
            )
        )

        # Create one page
        self.test_page = tests.create_page(
            content = "{% lucidTag unittest_plugin %}",
            template=self.template
        )

        self.base_url = "/%s/%s" % ( # Used with self.assertPluginAccess()
            settings.COMMAND_URL_PREFIX, self.test_page.id
        )
        self.command = "%s/%s/%%s/" % (self.base_url, TEST_PLUGIN_NAME)
        self.test_url = self.test_page.get_absolute_url()