Ejemplo n.º 1
0
 def test_interwikiFormat(self):
     interwikis = {
        'de':pywikibot.Page(self.site_de, 'German'),
        'fr':pywikibot.Page(self.site_fr, 'French')
     }
     self.assertEqual(self.iwresult1,
                      textlib.interwikiFormat(interwikis, self.site))
Ejemplo n.º 2
0
 def test_interwiki_format(self):
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German')),
         'fr': pywikibot.Page(pywikibot.Link('fr:French'))
     }
     self.assertEqual(
         '[[de:German]]%(LS)s[[fr:French]]%(LS)s' % {'LS': config.LS},
         textlib.interwikiFormat(interwikis, self.site))
Ejemplo n.º 3
0
 def test_interwiki_format(self):
     interwikis = {
         "de": pywikibot.Page(pywikibot.Link("de:German", self.site)),
         "fr": pywikibot.Page(pywikibot.Link("fr:French", self.site)),
     }
     self.assertEqual(
         "[[de:German]]%(LS)s[[fr:French]]%(LS)s" % {"LS": config.LS}, textlib.interwikiFormat(interwikis, self.site)
     )
Ejemplo n.º 4
0
 def test_interwiki_format(self):
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German', self.site)),
         'fr': pywikibot.Page(pywikibot.Link('fr:French', self.site))
     }
     self.assertEqual('[[de:German]]%(LS)s[[fr:French]]%(LS)s'
                      % {'LS': config.LS},
                      textlib.interwikiFormat(interwikis, self.site))
Ejemplo n.º 5
0
 def test_interwiki_format(self):
     """Test formatting interwiki links using Page instances."""
     interwikis = {
         'de': pywikibot.Page(pywikibot.Link('de:German', self.site)),
         'fr': pywikibot.Page(pywikibot.Link('fr:French', self.site))
     }
     self.assertEqual(
         '[[de:German]]%(LS)s[[fr:French]]%(LS)s' % {'LS': config.LS},
         textlib.interwikiFormat(interwikis, self.site))