tests.file_tests module#
FilePage tests.
- class tests.file_tests.TestFilePage(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test FilePage.latest_revision_info.
These tests cover exceptions for all properties and methods in FilePage that rely on site.loadimageinfo.
- abstract_class = False#
- cached = True#
- code = 'test'#
- family = 'wikipedia'#
- file_name = 'File:Albert Einstein Head.jpg'#
- net = True#
- site = True#
- sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
- class tests.file_tests.TestFilePageCommons(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test methods of the FilePage class on Commons.
- abstract_class = False#
- cached = True#
- code = 'commons'#
- family = 'commons'#
- net = True#
- site = True#
- sites = {'commons:commons': {'code': 'commons', 'family': 'commons'}}#
- test_globalusage_commons_commons()#
Test globalusage generator on commons:commons
- class tests.file_tests.TestFilePageDataItem(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test structured data of FilePage.
- abstract_class = False#
- cached = True#
- code = 'commons'#
- family = 'commons'#
- net = True#
- site = True#
- sites = {'commons:commons': {'code': 'commons', 'family': 'commons'}}#
- class tests.file_tests.TestFilePageDownload(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test download of FilePage to local file.
- abstract_class = False#
- cached = True#
- code = 'commons'#
- family = 'commons'#
- net = True#
- site = True#
- sites = {'commons:commons': {'code': 'commons', 'family': 'commons'}}#
- class tests.file_tests.TestFilePageLatestFileInfo(*args, **kwargs)[source]#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test FilePage.latest_file_info.
These tests cover properties and methods in FilePage that rely on site.loadimageinfo.
- abstract_class = False#
- cached = True#
- code = 'commons'#
- family = 'commons'#
- file_name = 'File:Albert Einstein Head.jpg'#
- net = True#
- site = True#
- sites = {'commons:commons': {'code': 'commons', 'family': 'commons'}}#
Bases:
CheckHostnameMixin
,ForceCacheMixin
,TestCase
Test file_is_shared, exists, fileUrl/get_file_url with shared files.
Test file_is_shared() on file page with local file only.
Test file page, without local file, existing on the local wiki.
Test file_is_shared() on file page with local and shared file.
Test file_is_shared() on file page with shared file only.