| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1 | from juju.client import client |
| 2 | |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame^] | 3 | import pytest |
| 4 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 5 | from .. import base |
| 6 | |
| 7 | |
| 8 | @base.bootstrapped |
| 9 | @pytest.mark.asyncio |
| 10 | async def test_user_info(event_loop): |
| 11 | async with base.CleanModel() as model: |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame^] | 12 | controller_conn = await model.connection().controller() |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 13 | |
| 14 | um = client.UserManagerFacade.from_connection(controller_conn) |
| 15 | result = await um.UserInfo( |
| 16 | [client.Entity('user-admin')], True) |
| 17 | await controller_conn.close() |
| 18 | |
| 19 | assert isinstance(result, client.UserInfoResults) |
| 20 | for r in result.results: |
| 21 | assert isinstance(r, client.UserInfoResult) |