tests.family_tests module#

Tests for the family module.

class tests.family_tests.TestFamily(*args, **kwargs)[source]#

Bases: DisableSiteMixin, TestCase

Test cases for Family methods.

abstract_class = False#
test_WikimediaFamily_obsolete_readonly()[source]#

Test WikimediaFamily obsolete is readonly.

test_eq_family_with_string_repr_not_existing_family()[source]#

Test that Family and string with different name are not equal.

test_eq_family_with_string_repr_same_family()[source]#

Test that Family and string with same name are equal.

test_family_load_invalid()[source]#

Test that an invalid family raised UnknownFamilyError.

test_family_load_valid()[source]#

Test that a family can be loaded via Family.load.

test_get_obsolete_wp()[source]#

Test three types of obsolete codes.

test_ne_family_with_string_repr_different_family()[source]#

Test that Family and string with different name are not equal.

test_new_different_families_ne()[source]#

Test that two different Family are not same nor equal.

test_new_same_family_singleton()[source]#

Test that two same Family are the same object and equal.

test_obsolete_readonly()[source]#

Test obsolete result not updatable.

test_set_obsolete()[source]#

Test obsolete can be set.

class tests.family_tests.TestFamilyUrlRegex(*args, **kwargs)[source]#

Bases: DisableSiteMixin, PatchingTestCase

Test family URL regex.

Site(*args, **kwargs)[source]#

Own DrySite creator.

abstract_class = False#
setUp()[source]#

Setup default article path.

test_each_family()[source]#

Test each family builds a working regex.

test_from_url_wikipedia_extra()[source]#

Test various URLs against wikipedia regex.