Esempio n. 1
0
def test_lang_id_garbage(garbage, rescue_plain_fx: Rescue):
    """
    Verifies throwing garbage types at Rescue.lang_id results in a TypeError
    Args:
        garbage (): Garbage to throw
        rescue_plain_fx (Rescue): Plain rescue Fixture
    """
    with pytest.raises(TypeError):
        rescue_plain_fx.lang_id = garbage
Esempio n. 2
0
def test_lang_id_strings(test_input, rescue_plain_fx: Rescue):
    """
    Verifies the lang id can be set when passed a string

        Args:
            test_input (str): values to test
            rescue_plain_fx (Rescue): Rescue fixture

    """

    rescue_plain_fx.lang_id = test_input
    assert rescue_plain_fx.lang_id == test_input