File tree Expand file tree Collapse file tree 3 files changed +31
-88
lines changed
Expand file tree Collapse file tree 3 files changed +31
-88
lines changed Original file line number Diff line number Diff line change 33import gitlab
44
55
6- @pytest .fixture (scope = "session" )
7- def fixture_dir (test_dir ):
8- return test_dir / "unit" / "fixtures"
9-
10-
116@pytest .fixture
127def gl ():
138 return gitlab .Gitlab (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11"""
22GitLab API: https://docs.gitlab.com/ce/api/todos.html
33"""
4-
5- import json
6-
74import pytest
85import responses
96
107from gitlab .v4 .objects import Todo
118
129
13- @pytest .fixture ()
14- def json_content (fixture_dir ):
15- with open (fixture_dir / "todo.json" , "r" , encoding = "utf-8" ) as f :
16- todo_content = f .read ()
17- return json .loads (todo_content )
10+ @pytest .fixture
11+ def json_content ():
12+ return [
13+ {
14+ "id" : 102 ,
15+ "project" : {
16+ "id" : 2 ,
17+ "name" : "Gitlab Ce" ,
18+ "name_with_namespace" : "Gitlab Org / Gitlab Ce" ,
19+ "path" : "gitlab-ce" ,
20+ "path_with_namespace" : "gitlab-org/gitlab-ce" ,
21+ },
22+ "author" : {
23+ "name" : "Administrator" ,
24+ "username" : "root" ,
25+ "id" : 1 ,
26+ },
27+ "action_name" : "marked" ,
28+ "target_type" : "MergeRequest" ,
29+ "target" : {
30+ "id" : 34 ,
31+ "iid" : 7 ,
32+ "project_id" : 2 ,
33+ "assignee" : {
34+ "name" : "Administrator" ,
35+ "username" : "root" ,
36+ "id" : 1 ,
37+ },
38+ },
39+ }
40+ ]
1841
1942
2043@pytest .fixture
You can’t perform that action at this time.
0 commit comments