Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add tests for service accounts #3033

Open
@nejch

Description

@nejch
          Did you still want to add a few tests here @ka28kumar? Could just be a simple extension of: https://github.com/python-gitlab/python-gitlab/blob/3739b5dd11bed66fb482cf6d2dc34382327a0265/tests/functional/api/test_groups.py#L315

E.g.:

def test_group_service_accounts(group):
    service_account = group.service_accounts.create(
        {"name": "gitlab-service-account", "username": "gitlab-service-account"}
    )
    assert service_account.name == "gitlab-service-account"
    assert service_account.username == "gitlab-service-account"

    service_accounts = group.service_accounts.list()
    assert service_accounts[0] == service_account

    service_account.delete()

Or something like that. Let me know otherwise we can also take over here!

Originally posted by @nejch in #2963 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions