@mock.patch("h.accounts.models.User.get_by_username")
def test_make_admin_gets_user_by_username(get_by_username):
    accounts.make_admin("fred")

    get_by_username.assert_called_once_with("fred")
Target database must support self-referential foreign keys.
dataset/ETHPy150Open hypothesis/h/h/accounts/test/__init___test.py/test_make_admin_gets_user_by_username--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/testing/requirements.py/SuiteRequirements.self_referential_foreign_keys