tests.pagegenerators_tests module#
Test pagegenerators module.
- class tests.pagegenerators_tests.BasetitleTestCase(*args, **kwargs)[source]#
Bases:
TestCase
Class providing base_title attribute.
- abstract_class = True#
- base_title = 'Page:06-24-1920 -The Story of the Jones County Calf Case.pdf/{}'#
- code = 'en'#
- family = 'wikisource'#
- class tests.pagegenerators_tests.DryFactoryGeneratorTest(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,TestCase
Dry tests for pagegenerators.GeneratorFactory.
- abstract_class = False#
- code = 'en'#
- dry = True#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.EdittimeFilterPageGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test EdittimeFilterPageGenerator.
- abstract_class = False#
- code = 'en'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- titles = ('Eastern Sayan', 'The Addams Family (pinball)', 'Talk:Nowy Sącz', 'Talk:Battle of Węgierska Górka', 'Template:!', 'Template:Template')#
- class tests.pagegenerators_tests.EnWikipediaPageGeneratorIntersectTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,GeneratorIntersectTestCase
,RecentChangesTestCase
Page intersect_generators test cases.
- abstract_class = False#
- code = 'en'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.EventStreamsPageGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,RecentChangesTestCase
Test case for Live Recent Changes pagegenerator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.PageGeneratorIntersectTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,GeneratorIntersectTestCase
,RecentChangesTestCase
Page intersect_generators test cases.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.PetScanPageGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test PetScanPageGenerator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.RedirectFilterPageGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test RedirectFilterPageGenerator.
- abstract_class = False#
- code = 'en'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.SubpageFilterGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test SubpageFilterGenerator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestCategoryFilterPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,BasetitleTestCase
Test CategoryFilterPageGenerator method.
- abstract_class = False#
- category_list = ['Category:Validated']#
- code = 'en'#
- family = 'wikisource'#
- net = True#
- site = True#
- sites = {'wikisource:en': {'code': 'en', 'family': 'wikisource'}}#
- class tests.pagegenerators_tests.TestDayPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test the day page generator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestDequePreloadingGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test preloading generator on lists.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestDryPageGenerators(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,TestCase
Test pagegenerators methods.
- abstract_class = False#
- code = 'en'#
- dry = True#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- titles = ('Eastern Sayan', 'The Addams Family (pinball)', 'Talk:Nowy Sącz', 'Talk:Battle of Węgierska Górka', 'Template:!', 'Template:Template', 'Cities in Burkina Faso', 'Talk:Hispanic (U.S. Census)', 'Talk:Stołpce', 'Template:!/Doc', 'Template:!/Meta', 'Template:Template/Doc', 'Template:Template/Meta')#
- class tests.pagegenerators_tests.TestFactoryGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test pagegenerators.GeneratorFactory.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- test_positionalargument_with_colon()[source]#
Test page generator with positional argument with colon.
- test_recentchanges_timespan()[source]#
Test recentchanges generator with offset and duration params.
- class tests.pagegenerators_tests.TestFactoryGeneratorNewpages(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test pagegenerators.GeneratorFactory for newpages.
- abstract_class = False#
- net = True#
- site = True#
- sites = {'commons': {'code': 'commons', 'family': 'commons'}, 'devoy': {'code': 'de', 'family': 'wikivoyage'}, 'eswiki': {'code': 'es', 'family': 'wikipedia'}, 'frsource': {'code': 'fr', 'family': 'wikisource'}, 'meta': {'code': 'meta', 'family': 'meta'}, 'ruwikt': {'code': 'ru', 'family': 'wiktionary'}}#
- test_newpages_default_commons()#
Test newpages generator on commons:commons
- test_newpages_default_devoy()#
Test newpages generator on wikivoyage:de
- test_newpages_default_eswiki()#
Test newpages generator on wikipedia:es
- test_newpages_default_frsource()#
Test newpages generator on wikisource:fr
- test_newpages_default_meta()#
Test newpages generator on meta:meta
- test_newpages_default_ruwikt()#
Test newpages generator on wiktionary:ru
- test_newpages_ns_commons()#
Test newpages generator with limit argument and namespace filter on commons:commons
- test_newpages_ns_default_commons()#
Test newpages generator with limit argument on commons:commons
- test_newpages_ns_default_devoy()#
Test newpages generator with limit argument on wikivoyage:de
- test_newpages_ns_default_eswiki()#
Test newpages generator with limit argument on wikipedia:es
- test_newpages_ns_default_frsource()#
Test newpages generator with limit argument on wikisource:fr
- test_newpages_ns_default_meta()#
Test newpages generator with limit argument on meta:meta
- test_newpages_ns_default_ruwikt()#
Test newpages generator with limit argument on wiktionary:ru
- test_newpages_ns_devoy()#
Test newpages generator with limit argument and namespace filter on wikivoyage:de
- test_newpages_ns_eswiki()#
Test newpages generator with limit argument and namespace filter on wikipedia:es
- test_newpages_ns_frsource()#
Test newpages generator with limit argument and namespace filter on wikisource:fr
- test_newpages_ns_meta()#
Test newpages generator with limit argument and namespace filter on meta:meta
- test_newpages_ns_ruwikt()#
Test newpages generator with limit argument and namespace filter on wiktionary:ru
- class tests.pagegenerators_tests.TestFactoryGeneratorWikibase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,WikidataTestCase
Test pagegenerators.GeneratorFactory on Wikibase site.
- abstract_class = False#
- cached = True#
- code = 'wikidata'#
- family = 'wikidata'#
- net = True#
- site = True#
- sites = {'wikidata:wikidata': {'code': 'wikidata', 'family': 'wikidata'}}#
- wikibase = True#
- class tests.pagegenerators_tests.TestItemClaimFilterPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,WikidataTestCase
Test item claim filter page generator generator.
- abstract_class = False#
- cached = True#
- code = 'wikidata'#
- family = 'wikidata'#
- net = True#
- site = True#
- sites = {'wikidata:wikidata': {'code': 'wikidata', 'family': 'wikidata'}}#
- test_nonexisting_qualifiers()[source]#
Test ItemClaimFilterPageGenerator on sample page.
The item does not have the searched qualifiers.
- wikibase = True#
- class tests.pagegenerators_tests.TestLinksearchPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Tests for pagegenerators.LinksearchPageGenerator.
- abstract_class = False#
- code = 'en'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestLogeventsFactoryGenerator(*args, **kwargs)[source]#
Bases:
RequireLoginMixin
,CheckHostnameMixin
,DefaultSiteTestCase
,DeprecationTestCase
Test GeneratorFactory with pagegenerators.LogeventsPageGenerator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- login = True#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestPagesFromPageidGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,BasetitleTestCase
Test PagesFromPageidGenerator method.
- abstract_class = False#
- code = 'en'#
- family = 'wikisource'#
- net = True#
- site = True#
- sites = {'wikisource:en': {'code': 'en', 'family': 'wikisource'}}#
- class tests.pagegenerators_tests.TestPreloadingEntityGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,WikidataTestCase
Test preloading item generator.
- abstract_class = False#
- cached = True#
- code = 'wikidata'#
- family = 'wikidata'#
- net = True#
- site = True#
- sites = {'wikidata:wikidata': {'code': 'wikidata', 'family': 'wikidata'}}#
- wikibase = True#
- class tests.pagegenerators_tests.TestPreloadingGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test preloading generator on lists.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestQualityFilterPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,BasetitleTestCase
Test QualityFilterPageGenerator methods.
- abstract_class = False#
- base_title = 'Page:Popular Science Monthly Volume 1.djvu/{}'#
- cached = True#
- code = 'en'#
- family = 'wikisource'#
- net = True#
- site = True#
- sites = {'wikisource:en': {'code': 'en', 'family': 'wikisource'}}#
- class tests.pagegenerators_tests.TestRepeatingGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,RecentChangesTestCase
Test RepeatingGenerator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestTextIOPageGenerator(*args, **kwargs)[source]#
Bases:
DisconnectedSiteMixin
,DefaultSiteTestCase
Test loading pages from a textfile.
- abstract_class = False#
- code = 'test'#
- dry = True#
- expected_titles = (('file', 'File'), ('bracket', 'Bracket'), ('MediaWiki:Test', 'MediaWiki:Test'), ('under score', 'Under score'), ('Upper case', 'Upper case'))#
- family = 'wikipedia'#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- title_columns = {'case-sensitive': 0, 'first-letter': 1}#
- class tests.pagegenerators_tests.TestUnconnectedPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,DefaultSiteTestCase
Test UnconnectedPageGenerator.
- abstract_class = False#
- cached = True#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestWantedFactoryGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test pagegenerators.GeneratorFactory for wanted pages.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.TestYearPageGenerator(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,DefaultSiteTestCase
Test the year page generator.
- abstract_class = False#
- code = 'test'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.pagegenerators_tests.WikibaseItemFilterPageGeneratorTestCase(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,TestCase
Test WikibaseItemFilterPageGenerator.
- abstract_class = False#
- code = 'en'#
- family = 'wikipedia'#
- net = True#
- site = True#
- sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#