Пример #1
0
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
Пример #2
0
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
Пример #3
0
def test_admin_is_admin(test_ctx):
    test_ctx.author = FakeAuthor(name="TestUser#0002", all_permissions=True)
    assert koalabot.is_admin(test_ctx)
Пример #4
0
def test_test_user_is_admin(test_ctx):
    assert koalabot.is_admin(test_ctx)