tests.category_tests module#

Tests for the Category class.

class tests.category_tests.CategoryNewestPages(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, ForceCacheMixin, TestCase

Test newest_pages feature on French Wikinews.

abstract_class = False#
cached = True#
code = 'fr'#
family = 'wikinews'#
net = True#
site = True#
sites = {'wikinews:fr': {'code': 'fr', 'family': 'wikinews'}}#
test_newest_pages()[source]#

Test that the pages are getting older.

class tests.category_tests.TestCategoryDryObject(*args, **kwargs)[source]#

Bases: DisconnectedSiteMixin, TestCase

Test the category object with dry tests.

NOCATEGORYNAMESPACE_RE = "'(.*?)' is not in the category namespace!"#
abstract_class = False#
code = 'en'#
dry = True#
family = 'wikipedia'#
site = True#
sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#

Test the title method with as_link=True.

test_init_dry()[source]#

Test the category’s __init__.

test_section()[source]#

Test the section method.

test_sortkey()[source]#

Test the sortKey attribute.

class tests.category_tests.TestCategoryObject(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, ForceCacheMixin, TestCase

Test Category object.

NOCATEGORYNAMESPACE_RE = "'(.*?)' is not in the category namespace!"#
NOREDIRECTPAGE_RE = 'Page \\[\\[(.*?)\\]\\] is not a redirect page.'#
abstract_class = False#
cached = True#
code = 'en'#
family = 'wikipedia'#
net = True#
site = True#
sites = {'wikipedia:en': {'code': 'en', 'family': 'wikipedia'}}#
test_articles()[source]#

Test the articles method.

test_categoryinfo()[source]#

Test the categoryinfo property.

test_init()[source]#

Test the category’s __init__ for one condition that can’t be dry.

test_is_empty()[source]#

Test if category is empty or not.

test_is_hidden()[source]#

Test isHiddenCategory.

test_members()[source]#

Test the members method.

test_redirects()[source]#

Test the redirects method.

test_subcategories()[source]#

Test the subcategories method.

test_subcategories_recurse()[source]#

Test the subcategories method with recurse=True.