tests.test_color_role_commands module

Tests for color role command functionality.

class tests.test_color_role_commands.TestColorRoleUtilities(methodName='runTest')[source]

Bases: TestCase

Test utility functions for color role commands.

test_is_valid_hex_color()[source]

Test hex color validation.

test_hex_to_discord_color()[source]

Test hex to Discord color conversion.

test_get_lowest_position()[source]

Test getting lowest position for role placement.

class tests.test_color_role_commands.MockRole(name, color=0)[source]

Bases: object

Mock Discord role for testing.

__init__(name, color=0)[source]
class tests.test_color_role_commands.MockGuild(roles)[source]

Bases: object

Mock Discord guild for testing.

__init__(roles)[source]
class tests.test_color_role_commands.TestFindExistingColorRole(methodName='runTest')[source]

Bases: TestCase

Test finding existing color roles.

test_find_existing_color_role_exact_match()[source]

Test finding exact match for color role.

test_find_existing_color_role_case_insensitive()[source]

Test case insensitive matching.

test_find_existing_color_role_no_match()[source]

Test when no matching color role exists.

test_find_existing_color_role_non_hex_roles_ignored()[source]

Test that non-hex roles are ignored.

test_find_existing_color_role_multiple_formats()[source]

Test finding roles in different valid formats.