Beispiel #1
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        factory = TextPageFactory()
        factory.create (self.wikiroot, u"Страница 1", [])
        factory.create (self.wikiroot, u"Страница 2", [])
        factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])
Beispiel #2
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.wikiroot = WikiDocument.create (self.path)
Beispiel #3
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        TextPageFactory().create(self.wikiroot, u"Страница", [])

        self.testpage = self.wikiroot[u"Страница"]

        Application.wikiroot = self.wikiroot
        Application.selectedPage = self.testpage
Beispiel #4
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        self.attachAction = Application.actionController.getAction(
            ShowHideAttachesAction.stringId)
        self.treeAction = Application.actionController.getAction(
            ShowHideTreeAction.stringId)
        self.tagsAction = Application.actionController.getAction(
            ShowHideTagsAction.stringId)
Beispiel #5
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        TextPageFactory().create (self.wikiroot, u"Страница", [])

        self.testpage = self.wikiroot[u"Страница"]

        Application.wikiroot = self.wikiroot
        Application.selectedPage = self.testpage
Beispiel #6
0
    def setUp (self):
        BaseMainWndTest.setUp (self)
        self.config = GeneralGuiConfig (Application.config)
        self.config.pageTab.remove_option()

        self.wikipage = WikiPageFactory().create (self.wikiroot, u'Викистраница', [])
        self.htmlpage = HtmlPageFactory().create (self.wikiroot, u'HTML-страница', [])

        Application.wikiroot = self.wikiroot
        Application.selectedPage = None
Beispiel #7
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.wikiroot = WikiDocument.create (self.path)

        HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory.create (self.wikiroot, u"HTML-страница 2", [])
Beispiel #8
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.path2 = mkdtemp (prefix=u'Абырвалг абырвалг')

        factory = TextPageFactory()
        factory.create (self.wikiroot, u"Страница 1", [])
        factory.create (self.wikiroot, u"Страница 2", [])
        factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])

        Tester.dialogTester.clear()
Beispiel #9
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        self.path2 = mkdtemp(prefix=u'Абырвалг абырвалг')

        factory = TextPageFactory()
        factory.create(self.wikiroot, u"Страница 1", [])
        factory.create(self.wikiroot, u"Страница 2", [])
        factory.create(self.wikiroot[u"Страница 2"], u"Страница 3", [])

        Tester.dialogTester.clear()
Beispiel #10
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self.config = GeneralGuiConfig(Application.config)
        self.config.pageTab.remove_option()

        self.wikipage = WikiPageFactory().create(self.wikiroot,
                                                 u'Викистраница', [])
        self.htmlpage = HtmlPageFactory().create(self.wikiroot,
                                                 u'HTML-страница', [])

        Application.wikiroot = self.wikiroot
        Application.selectedPage = None
Beispiel #11
0
    def setUp (self):
        BaseMainWndTest.setUp (self)
        self._dialog = IncludeDialog (Application.mainWindow)

        WikiPageFactory().create (self.wikiroot, u"Викистраница", [])
        self.testedPage = self.wikiroot[u"Викистраница"]

        filesPath = u"../test/samplefiles/"
        self.files = [u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp", u"dir"]
        self.fullFilesPath = [os.path.join (filesPath, fname) for fname in self.files]

        Attachment (self.testedPage).attach (self.fullFilesPath)
        Tester.dialogTester.clear()
Beispiel #12
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.rootwiki = WikiDocument.create (self.path)

        TextPageFactory.create (self.rootwiki, u"Страница 1", [])
        TextPageFactory.create (self.rootwiki, u"Страница 2", [])
        TextPageFactory.create (self.rootwiki[u"Страница 2"], u"Страница 3", [])
        TextPageFactory.create (self.rootwiki[u"Страница 2/Страница 3"], u"Страница 4", [])
        TextPageFactory.create (self.rootwiki[u"Страница 1"], u"Страница 5", [])
Beispiel #13
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        factory = TextPageFactory()
        factory.create (self.wikiroot, u"Страница 1", [])
        factory.create (self.wikiroot, u"Страница 2", [])
        factory.create (self.wikiroot[u"Страница 2"], u"Страница 3", [])

        self.page = self.wikiroot[u"Страница 2/Страница 3"]

        filesPath = u"../test/samplefiles/"
        self.files = [u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp", u"dir"]
        self.fullFilesPath = [os.path.join (filesPath, fname) for fname in self.files]
Beispiel #14
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        TextPageFactory().create(self.wikiroot, u"Текстовая страница", [])
        TextPageFactory().create(self.wikiroot, u"Текстовая страница 2", [])

        HtmlPageFactory().create(self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory().create(self.wikiroot, u"HTML-страница 2", [])

        WikiPageFactory().create(self.wikiroot, u"Викистраница", [])
        WikiPageFactory().create(self.wikiroot, u"Викистраница 2", [])

        SearchPageFactory().create(self.wikiroot, u"Поисковая страница", [])
        SearchPageFactory().create(self.wikiroot, u"Поисковая страница 2", [])
Beispiel #15
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self._turnSyntax = [
                (BOLD_STR_ID, "<b>", "</b>"),
                (ITALIC_STR_ID, "<i>", "</i>"),
                (BOLD_ITALIC_STR_ID, "<b><i>", "</i></b>"),
                (UNDERLINE_STR_ID, "<u>", "</u>"),
                (STRIKE_STR_ID, "<strike>", "</strike>"),
                (SUBSCRIPT_STR_ID, "<sub>", "</sub>"),
                (SUPERSCRIPT_STR_ID, "<sup>", "</sup>"),
                (ALIGN_LEFT_STR_ID, '<div align="left">', '</div>'),
                (ALIGN_CENTER_STR_ID, '<div align="center">', '</div>'),
                (ALIGN_RIGHT_STR_ID, '<div align="right">', '</div>'),
                (ALIGN_JUSTIFY_STR_ID, '<div align="justify">', '</div>'),
                (HEADING_1_STR_ID, "<h1>", "</h1>"),
                (HEADING_2_STR_ID, "<h2>", "</h2>"),
                (HEADING_3_STR_ID, "<h3>", "</h3>"),
                (HEADING_4_STR_ID, "<h4>", "</h4>"),
                (HEADING_5_STR_ID, "<h5>", "</h5>"),
                (HEADING_6_STR_ID, "<h6>", "</h6>"),
                (PREFORMAT_STR_ID, "<pre>", "</pre>"),
                (CODE_STR_ID, "<code>", "</code>"),
                (ANCHOR_STR_ID, u'<a name="', u'"></a>'),
                (TABLE_STR_ID, u'<table>', u'</table>'),
                (TABLE_ROW_STR_ID, u'<tr>', u'</tr>'),
                (TABLE_CELL_STR_ID, u'<td>', u'</td>'),
                (QUOTE_STR_ID, u'<blockquote>', u'</blockquote>'),
                (IMAGE_STR_ID, u'<img src="', u'"/>'),
                ]

        self._replaceSyntax = [
                (HORLINE_STR_ID, u"<hr>"),
                ]

        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.wikiroot = WikiDocument.create (self.path)
        HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory.create (self.wikiroot, u"temp", [])

        # Страница, куда будем переключаться перед изменением содержимого основной страницы
        # Можно было бы вместо temppage использовать None, но тогда программе 
        # пришлось бы каждый раз удалять и создавать панели инструментов, что медленно
        self.temppage = self.wikiroot[u"temp"]
        self.testpage = self.wikiroot[u"HTML-страница"]

        Application.wikiroot = self.wikiroot
        Application.selectedPage = self.testpage
Beispiel #16
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        TextPageFactory().create (self.wikiroot, u"Текстовая страница", [])
        TextPageFactory().create (self.wikiroot, u"Текстовая страница 2", [])

        HtmlPageFactory().create (self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory().create (self.wikiroot, u"HTML-страница 2", [])

        WikiPageFactory().create (self.wikiroot, u"Викистраница", [])
        WikiPageFactory().create (self.wikiroot, u"Викистраница 2", [])

        SearchPageFactory().create (self.wikiroot, u"Поисковая страница", [])
        SearchPageFactory().create (self.wikiroot, u"Поисковая страница 2", [])
Beispiel #17
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self._turnSyntax = [
                (BOLD_STR_ID, "'''", "'''"),
                (ITALIC_STR_ID, "''", "''"),
                (BOLD_ITALIC_STR_ID, "''''", "''''"),
                (UNDERLINE_STR_ID, "{+", "+}"),
                (STRIKE_STR_ID, "{-", "-}"),
                (SUBSCRIPT_STR_ID, "'_", "_'"),
                (SUPERSCRIPT_STR_ID, "'^", "^'"),
                (ALIGN_LEFT_STR_ID, "%left%", ""),
                (ALIGN_CENTER_STR_ID, "%center%", ""),
                (ALIGN_RIGHT_STR_ID, "%right%", ""),
                (ALIGN_JUSTIFY_STR_ID, "%justify%", ""),
                (HEADING_1_STR_ID, "!! ", ""),
                (HEADING_2_STR_ID, "!!! ", ""),
                (HEADING_3_STR_ID, "!!!! ", ""),
                (HEADING_4_STR_ID, "!!!!! ", ""),
                (HEADING_5_STR_ID, "!!!!!! ", ""),
                (HEADING_6_STR_ID, "!!!!!!! ", ""),
                (PREFORMAT_STR_ID, "[@", "@]"),
                (CODE_STR_ID, "@@", "@@"),
                (ANCHOR_STR_ID, "[[#", "]]"),
                (QUOTE_STR_ID, "[>", "<]"),
                ]

        self._replaceSyntax = [
                (HORLINE_STR_ID, u"----"),
                ]


        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.wikiroot = WikiDocument.create (self.path)
        WikiPageFactory.create (self.wikiroot, u"Викистраница", [])
        WikiPageFactory.create (self.wikiroot, u"temp", [])

        # Страница, куда будем переключаться перед изменением содержимого основной страницы
        # Можно было бы вместо temppage использовать None, но тогда программе 
        # пришлось бы каждый раз удалять и создавать панели инструментов, что медленно
        self.temppage = self.wikiroot[u"temp"]
        self.testpage = self.wikiroot[u"Викистраница"]

        Application.wikiroot = self.wikiroot
        Application.selectedPage = self.testpage
Beispiel #18
0
    def setUp(self):
        BaseMainWndTest.setUp(self)

        factory = TextPageFactory()
        factory.create(self.wikiroot, u"Страница 1", [])
        factory.create(self.wikiroot, u"Страница 2", [])
        factory.create(self.wikiroot[u"Страница 2"], u"Страница 3", [])

        self.page = self.wikiroot[u"Страница 2/Страница 3"]

        filesPath = u"../test/samplefiles/"
        self.files = [
            u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp",
            u"dir"
        ]
        self.fullFilesPath = [
            os.path.join(filesPath, fname) for fname in self.files
        ]
Beispiel #19
0
    def setUp(self):
        BaseMainWndTest.setUp(self)
        self._dialog = IncludeDialog(Application.mainWindow)

        WikiPageFactory().create(self.wikiroot, u"Викистраница", [])
        self.testedPage = self.wikiroot[u"Викистраница"]

        filesPath = u"../test/samplefiles/"
        self.files = [
            u"accept.png", u"add.png", u"anchor.png", u"файл с пробелами.tmp",
            u"dir"
        ]
        self.fullFilesPath = [
            os.path.join(filesPath, fname) for fname in self.files
        ]

        Attachment(self.testedPage).attach(self.fullFilesPath)
        Tester.dialogTester.clear()
Beispiel #20
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.path = u"../test/testwiki"
        removeWiki (self.path)

        self.wikiroot = WikiDocument.create (self.path)

        TextPageFactory.create (self.wikiroot, u"Текстовая страница", [])
        TextPageFactory.create (self.wikiroot, u"Текстовая страница 2", [])

        HtmlPageFactory.create (self.wikiroot, u"HTML-страница", [])
        HtmlPageFactory.create (self.wikiroot, u"HTML-страница 2", [])

        WikiPageFactory.create (self.wikiroot, u"Викистраница", [])
        WikiPageFactory.create (self.wikiroot, u"Викистраница 2", [])

        SearchPageFactory.create (self.wikiroot, u"Поисковая страница", [])
        SearchPageFactory.create (self.wikiroot, u"Поисковая страница 2", [])
Beispiel #21
0
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self._dialog = AttachListDialog(Application.mainWindow)
     Tester.dialogTester.clear()
 def setUp (self):
     BaseMainWndTest.setUp (self)
     self._dialog = ChildListDialog (Application.mainWindow)
Beispiel #23
0
 def setUp (self):
     BaseMainWndTest.setUp (self)
     self.actionController = ActionController(self.wnd, Application.config)
     Application.config.remove_section (self.actionController.configSection)
Beispiel #24
0
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self._mainWnd = Application.mainWindow
Beispiel #25
0
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self._mainWnd = Application.mainWindow
Beispiel #26
0
 def setUp (self):
     BaseMainWndTest.setUp (self)
Beispiel #27
0
    def setUp (self):
        BaseMainWndTest.setUp (self)

        self.attachAction = Application.actionController.getAction (ShowHideAttachesAction.stringId)
        self.treeAction = Application.actionController.getAction (ShowHideTreeAction.stringId)
        self.tagsAction = Application.actionController.getAction (ShowHideTagsAction.stringId)
Beispiel #28
0
 def setUp(self):
     BaseMainWndTest.setUp(self)
     self.actionController = ActionController(self.wnd, Application.config)
     Application.config.remove_section(self.actionController.configSection)
Beispiel #29
0
 def setUp (self):
     BaseMainWndTest.setUp (self)
     self._dialog = AttachListDialog (Application.mainWindow)
     Tester.dialogTester.clear()