File tree 3 files changed +31
-88
lines changed
3 files changed +31
-88
lines changed Original file line number Diff line number Diff line change 3
3
import gitlab
4
4
5
5
6
- @pytest .fixture (scope = "session" )
7
- def fixture_dir (test_dir ):
8
- return test_dir / "unit" / "fixtures"
9
-
10
-
11
6
@pytest .fixture
12
7
def gl ():
13
8
return gitlab .Gitlab (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
"""
2
2
GitLab API: https://docs.gitlab.com/ce/api/todos.html
3
3
"""
4
-
5
- import json
6
-
7
4
import pytest
8
5
import responses
9
6
10
7
from gitlab .v4 .objects import Todo
11
8
12
9
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
+ ]
18
41
19
42
20
43
@pytest .fixture
You can’t perform that action at this time.
0 commit comments