def test_not_admin_is_admin(test_ctx): test_ctx.author = FakeAuthor(all_permissions=False) koalabot.is_dpytest = False assert not koalabot.is_admin(test_ctx) koalabot.is_dpytest = True
def test_invalid_test_user_is_admin(test_ctx): test_ctx.author = FakeAuthor(id=int(koalabot.BOT_OWNER) + 2) koalabot.is_dpytest = False assert not koalabot.is_admin(test_ctx) koalabot.is_dpytest = True
def test_admin_is_admin(test_ctx): test_ctx.author = FakeAuthor(name="TestUser#0002", all_permissions=True) assert koalabot.is_admin(test_ctx)
def test_test_user_is_admin(test_ctx): assert koalabot.is_admin(test_ctx)