Beispiel #1
0
    async def cleanUp(self):

        await self.client.delete(range_all())

        await self.root_client.auth_disable()

        await self.delete_all_user()
        await self.delete_all_role()
Beispiel #2
0
    async def test_auth_3(self):

        await self.client.user_add(username=TEST_USER_NAME, password="******")
        with self.assertRaises(Exception):
            await self.client.user_grant_role(username=TEST_USER_NAME,
                                              role=TEST_ROLE_NAME)

        await self.client.role_add(name=TEST_ROLE_NAME)
        await self.client.user_grant_role(username=TEST_USER_NAME,
                                          role=TEST_ROLE_NAME)

        await self.client.role_grant_permission(name=TEST_ROLE_NAME,
                                                key_range=range_all(),
                                                permission=PER_RW)

        await self.client.user_revoke_role(username=TEST_USER_NAME,
                                           role=TEST_ROLE_NAME)

        await self.client.role_revoke_permission(name=TEST_ROLE_NAME,
                                                 key_range=range_all())
Beispiel #3
0
 async def cleanUp(self):
     await self.client.delete(range_all())
Beispiel #4
0
 async def cleanUp(self):
     await self.unauthenticated_client.delete(range_all())