diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-27 19:28:31 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-27 19:28:31 +0200 |
commit | 70257438044b793a42adce791037b9b86ae35d9b (patch) | |
tree | e38f46effcfe54cb3346b985c1ca41c61b8da103 /tools/python_test_v4.py | |
parent | 590ea0da7e5617c42e705c62370d6e94ff46ea74 (diff) | |
download | gitlab-70257438044b793a42adce791037b9b86ae35d9b.tar.gz |
Implement user_agent_detail for snippets
Add a new UserAgentDetail mixin to avoid code duplication.
Diffstat (limited to 'tools/python_test_v4.py')
-rw-r--r-- | tools/python_test_v4.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py index 5cec8d3..fc19ee7 100644 --- a/tools/python_test_v4.py +++ b/tools/python_test_v4.py @@ -506,6 +506,8 @@ note.delete() assert(len(issue1.notes.list()) == 0) assert(isinstance(issue1.user_agent_detail(), dict)) +assert(issue1.user_agent_detail()['user_agent']) + discussion = issue1.discussions.create({'body': 'Discussion body'}) assert(len(issue1.discussions.list()) == 1) d_note = discussion.notes.create({'body': 'first note'}) @@ -534,6 +536,8 @@ snippet = admin_project.snippets.create( 'visibility': gitlab.v4.objects.VISIBILITY_PRIVATE} ) +assert(snippet.user_agent_detail()['user_agent']) + discussion = snippet.discussions.create({'body': 'Discussion body'}) assert(len(snippet.discussions.list()) == 1) d_note = discussion.notes.create({'body': 'first note'}) @@ -699,6 +703,8 @@ assert(snippet.title == 'updated_title') content = snippet.content() assert(content == 'import gitlab') +assert(snippet.user_agent_detail()['user_agent']) + snippet.delete() snippets = gl.snippets.list(all=True) assert(len(snippets) == 0) |