taucmdr.cli.commands.system.tests.test_fetch module
Test functions.
Functions used for unit tests of system/fetch.py.
-
class taucmdr.cli.commands.system.tests.test_fetch.FetchTest(methodName='runTest')[source]
Bases: TestCase
Tests for system.fetch.
-
_archive(name)[source]
-
_classSetupFailed = False
-
_class_cleanups = []
-
setUp()[source]
Hook method for setting up the test fixture before exercising it.
-
test_fetch_all()[source]
-
test_fetch_keeps_good_archive()[source]
Fetching again keeps an archive that’s already there, even if no mirror answers.
-
test_fetch_mirror_fallback()[source]
-
test_fetch_rejects_non_archive()[source]
A mirror that answers with an error page counts as a failed mirror.
-
test_fetch_reports_failures()[source]
-
taucmdr.cli.commands.system.tests.test_fetch.make_archive(path, toplevel='pkg-1.0', size=0)[source]
Write a gzipped tar archive rooted in toplevel to path, and return path.
The archive holds a README and, if size is given, that many bytes of random data.