@mock.patch("h.accounts.models.User.get_by_username")
def test_make_admin_sets_admin_to_True_if_True(get_by_username):
    fred = mock.Mock()
    fred.admin = True
    get_by_username.return_value = fred

    accounts.make_admin("fred")

    assert fred.admin is True
Handler for devices like WLC, Avaya ERS that throw up characters prior to login.
dataset/ETHPy150Open hypothesis/h/h/accounts/test/__init___test.py/test_make_admin_sets_admin_to_True_if_True--crossover with--dataset/ETHPy150Open ktbyers/netmiko/netmiko/base_connection.py/BaseSSHConnection.special_login_handler