Skip to content

Commit d5d00c3

Browse files
committed
Add Gerrit test case for add action
1 parent 0654425 commit d5d00c3

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"http_interactions": [
3+
{
4+
"recorded_at": "2017-12-20T10:53:16",
5+
"request": {
6+
"body": {
7+
"encoding": "utf-8",
8+
"string": ""
9+
},
10+
"headers": {
11+
"Accept": "application/json",
12+
"Accept-Encoding": "identity",
13+
"Authorization": "Basic UGhhbnRvbS00MjovRk45NTI2TE84MkxYTXJucWJUNWE3Y25wSkY4b2hVTVFRQ1l6TkgzTVE=",
14+
"Connection": "keep-alive",
15+
"Content-Type": "application/json",
16+
"User-Agent": "python-requests/2.10.0"
17+
},
18+
"method": "GET",
19+
"uri": "https://review.gerrithub.io/a/config/server/version"
20+
},
21+
"response": {
22+
"body": {
23+
"encoding": "utf-8",
24+
"string": ")]}'\n\"2.13.6-3044-g7e9c06d\"\n"
25+
},
26+
"headers": {
27+
"Cache-Control": "no-cache, no-store, max-age=0, must-revalidate",
28+
"Connection": "close",
29+
"Content-Disposition": "attachment",
30+
"Content-Length": "28",
31+
"Content-Type": "application/json;charset=utf-8",
32+
"Date": "Wed, 20 Dec 2017 10:53:16 GMT",
33+
"Expires": "Mon, 01 Jan 1990 00:00:00 GMT",
34+
"Pragma": "no-cache",
35+
"Server": "Apache/2.4.6 (CentOS)",
36+
"Set-Cookie": "JSESSIONID=6xcvc7y9h7azpva4xnrxa0cv;Path=/;Secure",
37+
"X-Content-Type-Options": "nosniff"
38+
},
39+
"status": {
40+
"code": 200,
41+
"message": "OK"
42+
},
43+
"url": "https://review.gerrithub.io/a/config/server/version"
44+
}
45+
}
46+
],
47+
"recorded_with": "betamax/0.5.1"
48+
}

tests/integration/test_gerrit.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ def test_06_list_patchets(self):
7676
[392073, 'master', 'Commit-23', 'https://review.gerrithub.io/392073'],
7777
[392072, 'master', 'Commit-22', 'https://review.gerrithub.io/392072']
7878
])
79+
80+
def test_07_add(self):
81+
self.action_add(namespace='TestUser',
82+
repository='AnotherRepository')

0 commit comments

Comments
 (0)