tests.pyanaconda_tests package

Submodules

tests.pyanaconda_tests.argparse_test module

class tests.pyanaconda_tests.argparse_test.ArgparseTest(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

dirinstall_test()
display_mode_test()
selinux_test()

tests.pyanaconda_tests.dataholder_test module

class tests.pyanaconda_tests.dataholder_test.DataHolderTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

dataholder_test()

Test the DataHolder class

tests.pyanaconda_tests.grub_raid_test module

class tests.pyanaconda_tests.grub_raid_test.GRUBRaidSimpleTest(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

grub_btrfs_test()

Test installing GRUB to a MBR stage1 and btrfs RAID stage2

grub_mbr_partition_test()

Test installing GRUB to a MBR stage1 and partition stage2

grub_mbr_raid1_test()

Test installing GRUB to a MBR stage1 and RAID1 stage2

grub_partition_btrfs_test()

Test installing GRUB to a partition stage1 and MBR stage2

grub_partition_partition_test()

Test installing GRUB to a partition stage1 and partition stage2

grub_partition_raid1_test()

Test installing GRUB to a partition stage1 and MBR stage2

setUp()

Create some device objects to test with.

This sets up two disks (sda, sdb). The first partition of each is a biosboot partition. The second partitions comprise a RAID1 array formatted as /boot.

sda additionally contains a third partition formatted as ext4.

tests.pyanaconda_tests.iutil_test module

class tests.pyanaconda_tests.iutil_test.MiscTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

cmp_obj_attrs_test()

Test cmp_obj_attrs.

get_active_console_test()

Test get_active_console.

get_deep_attr_test()

Test getdeepattr.

get_dir_size_test()

Test the getDirSize.

have_word_match_test()

Test have_word_match.

is_console_on_vt_test()

Test isConsoleOnVirtualTerminal.

lower_ascii_test()

Test lowerASCII.

mkdir_chain_test()

Test mkdirChain.

open_with_perm_test()

Test the open_with_perm function

parent_dir_test()

Test the parent_dir function

parse_nfs_url_test()

Test parseNfsUrl.

set_deep_attr_test()

Test setdeepattr.

strip_accents_test()

Test strip_accents.

to_ascii_test()

Test _toASCII.

touch_test()

Test if the touch function correctly creates empty files

upper_ascii_test()

Test upperASCII.

vt_activate_test()

Test vtActivate.

class tests.pyanaconda_tests.iutil_test.RunProgramTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

exec_readlines_auto_kill_test()

Test execReadlines with reading only part of the output

exec_readlines_test()

Test execReadlines.

exec_readlines_test_exits()

Test execReadlines in different child exit situations.

exec_readlines_test_filter_stderr()

Test execReadlines and filter_stderr.

exec_readlines_test_normal_output()

Test the output of execReadlines.

exec_readlines_test_signals()

Test execReadlines and signal receipt.

exec_with_capture_empty_test()

Test execWithCapture with no output

exec_with_capture_no_stderr_test()

Test execWithCapture with no stderr

exec_with_capture_test()

Test execWithCapture.

exec_with_redirect_test()

Test execWithRedirect.

run_program_binary_test()

Test _run_program with binary output.

run_program_test()

Test the _run_program method.

start_program_preexec_fn_test()

Test passing preexec_fn to startProgram.

start_program_reset_handlers_test()

Test the reset_handlers parameter of startProgram.

start_program_stdout_test()

Test redirecting stdout with startProgram.

watch_process_test()

Test watchProcess

class tests.pyanaconda_tests.iutil_test.UpcaseFirstLetterTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()
tearDown()
upcase_first_letter_test()

Upcasing first letter should work as expected.

tests.pyanaconda_tests.keyboard_test module

class tests.pyanaconda_tests.keyboard_test.ParsingAndJoiningTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

layout_variant_joining_test()

Should correctly join keyboard layout and variant to a string spec.

layout_variant_normalize_test()

Normalizing layout and variant strings should work as expected.

layout_variant_parse_join_test()

Parsing and joining valid layout and variant spec should have no effect.

layout_variant_parsing_test()

Should correctly parse keyboard layout and variant string specs.

tests.pyanaconda_tests.ks_version_test module

class tests.pyanaconda_tests.ks_version_test.BaseTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()
class tests.pyanaconda_tests.ks_version_test.CommandVersionTestCase(methodName='runTest')

Bases: tests.pyanaconda_tests.ks_version_test.BaseTestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

commands_test()

Test that anaconda uses the right versions of kickstart commands

class tests.pyanaconda_tests.ks_version_test.DataVersionTestCase(methodName='runTest')

Bases: tests.pyanaconda_tests.ks_version_test.BaseTestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

data_test()

Test that anaconda uses the right versions of kickstart data

class tests.pyanaconda_tests.ks_version_test.DracutCommandVersionTestCase(methodName='runTest')

Bases: tests.pyanaconda_tests.ks_version_test.CommandVersionTestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

tests.pyanaconda_tests.localization_test module

class tests.pyanaconda_tests.localization_test.LangcodeLocaleMatchingTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

find_best_locale_match_test()

Finding best locale matches should work as expected.

langcode_matches_locale_test()

Langcode-locale matching should work as expected.

resolve_date_format_test()

All locales’ date formats should be properly resolved.

class tests.pyanaconda_tests.localization_test.ParsingTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

invalid_langcodes_test()

Should return None for invalid langcodes.

parsing_test()

Should correctly parse valid langcodes.

tests.pyanaconda_tests.network_test module

class tests.pyanaconda_tests.network_test.NetworkIfcfgTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

dracutBootArguments_s390_test()
dracutBootArguments_test()
ifcfg_mock(settings)
class tests.pyanaconda_tests.network_test.NetworkKSDataTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()
update_hostname_data_test()
class tests.pyanaconda_tests.network_test.NetworkTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

bond_options_ksdata_to_dbus_test()
default_ks_vlan_interface_name_test()
nm_check_ip_address_test()
nm_ks_spec_to_device_name_test(nm_hwaddr_mock)
prefix2netmask2prefix_test()
sanityCheckHostname_test()

tests.pyanaconda_tests.nm_test module

class tests.pyanaconda_tests.nm_test.UtilityFunctionsTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

ipv4_address_convert_test()
ipv6_address_convert_test()

tests.pyanaconda_tests.pwpolicy module

class tests.pyanaconda_tests.pwpolicy.BaseTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()
class tests.pyanaconda_tests.pwpolicy.PwPolicyTestCase(methodName='runTest')

Bases: tests.pyanaconda_tests.pwpolicy.BaseTestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

ks = '\n%anaconda\npwpolicy root --strict --minlen=8 --minquality=50 --nochanges --emptyok\npwpolicy user --strict --minlen=8 --minquality=50 --nochanges --emptyok\npwpolicy luks --strict --minlen=8 --minquality=50 --nochanges --emptyok\n%end\n'
pwpolicy_test()

tests.pyanaconda_tests.simpleconfig_test module

class tests.pyanaconda_tests.simpleconfig_test.SimpleConfigTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

TEST_CONFIG = 'ESSID="Example Network #1"\nESSID2="Network #2" # With a comment\nCOMMENT="Save this string" # Strip this comment\n#SKIP=Skip this commented line\nBOOT=always\nKEY=VALUE # Comment "with quotes"\nKEY2="A single \' inside" # And comment "with quotes"\n'
comment_test()
no_use_tmp_test()
quote_test()
read_test()
read_write_test()
remove_key_test()
set_and_get_test()

Setting and getting values

unquote_test()
unset_test()
use_tmp_multifs_test()
use_tmp_test()
write_new_keys_test()
write_test()
class tests.pyanaconda_tests.simpleconfig_test.SimpleReplaceTests(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

TEST_CONFIG = '#SKIP=Skip this commented line\nBOOT=always\n'
append_test()
no_append_test()
replace_test()

tests.pyanaconda_tests.test_constants module

tests.pyanaconda_tests.timezone_test module

class tests.pyanaconda_tests.timezone_test.TerritoryTimezones(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

invalid_territory_zones_test()

Check if None is return for an invalid territory.

string_valid_territory_zone_test()

Check if the returned value is string for a valid territory.

class tests.pyanaconda_tests.timezone_test.TimezonesListings(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

all_timezones_valid_test()

Check if all returned timezones are considered valid timezones.

string_timezones_test()

Check if returned timezones are plain strings, not unicode objects.

class tests.pyanaconda_tests.timezone_test.s390HWclock(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

s390_save_hw_clock_test()

Check that save_hw_clock does nothing on s390.

s390_time_initialize_test()

Check that time_initialize doesn’t call hwclock on s390.

setUp()

tests.pyanaconda_tests.user_create_test module

class tests.pyanaconda_tests.user_create_test.UserCreateTest(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

create_group_exists_test()

Create a group that already exists.

create_group_gid_exists_test()

Create a group with a GID that already exists.

create_group_gid_test()

Create a group with a specific GID.

create_group_test()

Create a group.

create_user_algo_test()

Create a user with a specific password algorithm.

create_user_exists_test()

Create a user that already exists.

create_user_gid_exists_test()

Create a user with a GID of an existing group.

create_user_gid_in_group_list_test()

Create a user with a GID equal to that of one of the requested groups

create_user_gid_test()

Create a user with a specific GID.

create_user_groups_gid_conflict_test()

Create a user with a bad list of groups.

create_user_groups_test()

Create a user with a list of groups.

create_user_lock_test()

Create a locked user account.

create_user_password_test()

Create a user with a password.

create_user_reuse_home_test()
create_user_test()

Create a user.

create_user_text_options_test()

Create a user with the text fields set.

create_user_uid_exists_test()

Create a user with a UID that already exists.

create_user_uid_test()

Create a user with a specific UID.

setUp()
set_root_password_test()
set_user_ssh_key_test()
tearDown()

Module contents