Esempio n. 1
0
    def setUp(self):
        """
        Create an admin user.
        """
        self._username = "******"
        self._password = "******"
        self._user = User.objects.create(username=self._username,
                                         password=self._password,
                                         email="*****@*****.**")

        #register our test widget
        try:
            widget_pool.register_widget(TestWidget)
        except WidgetAlreadyRegistered:
            pass

        #create page with widget slots
        self.page = RichTextPage.objects.create(title="testpage",
                                                status=CONTENT_STATUS_DRAFT)
        #create widget slot :)
        self.slot = "slot"

        #create test widget
        self.test_widgets = []
        self.widget_count = 3
        self.create_widgets()
Esempio n. 2
0
    def setUp(self):
        """
        Create an admin user.
        """
        self._username = "******"
        self._password = "******"
        self._user = User.objects.create(username=self._username,
                                         password=self._password, email="*****@*****.**")

        #register our test widget
        try:
            widget_pool.register_widget(TestWidget)
        except WidgetAlreadyRegistered:
            pass

        #create page with widget slots
        self.page = RichTextPage.objects.create(title="testpage",
                                                status=CONTENT_STATUS_DRAFT)
        #create widget slot :)
        self.slot = "slot"

        #create test widget
        self.test_widgets = []
        self.widget_count = 3
        self.create_widgets()