tests.data_ingestion_tests module#

Unit tests for data_ingestion.py script.

class tests.data_ingestion_tests.TestCSVReader(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, TestCase

Test CSVReader class.

abstract_class = False#
code = 'commons'#
family = 'commons'#
net = True#
setUp()[source]#

Set up unit test.

site = True#
sites = {'commons:commons': {'code': 'commons', 'family': 'commons'}}#
test_get_description()[source]#

Test getDescription().

test_get_title()[source]#

Test getTitle().

test_photo_url()[source]#

Test PhotoURL().

class tests.data_ingestion_tests.TestDataIngestionBot(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, ScriptMainTestCase

Test TestDataIngestionBot class.

abstract_class = False#
code = 'test'#
family = 'wikipedia'#
net = True#
site = True#
sites = {'wikipedia:test': {'code': 'test', 'family': 'wikipedia'}}#
test_existing_file()[source]#

Test uploading a file that already exists.

class tests.data_ingestion_tests.TestPhoto(*args, **kwargs)[source]#

Bases: CheckHostnameMixin, TestCase

Test Photo class.

abstract_class = False#
net = True#
setUp()[source]#

Set up unit test.

site = True#
sites = {'commons': {'code': 'commons', 'family': 'commons'}, 'wm-upload': {'hostname': 'upload.wikimedia.org'}}#
test_download_photo()[source]#

Test download from http://upload.wikimedia.org/.

test_find_duplicate_images()[source]#

Test finding duplicates on Wikimedia Commons.

test_get_description()[source]#

Test getDescription().

test_get_title()[source]#

Test getTitle().