##// END OF EJS Templates
tests: fixes after some later code changes
marcink -
r3873:927faae7 default
parent child Browse files
Show More
@@ -38,7 +38,7 b' class TestGetPullRequest(object):'
38 pull_request = pr_util.create_pull_request(mergeable=True)
38 pull_request = pr_util.create_pull_request(mergeable=True)
39 id_, params = build_data(
39 id_, params = build_data(
40 self.apikey, 'get_pull_request',
40 self.apikey, 'get_pull_request',
41 pullrequestid=pull_request.pull_request_id)
41 pullrequestid=pull_request.pull_request_id, merge_state=True)
42
42
43 response = api_call(self.app, params)
43 response = api_call(self.app, params)
44
44
@@ -79,13 +79,19 b' class TestRepoCommitView(object):'
79 'git': '03fa803d7e9fb14daa9a3089e0d1494eda75d986',
79 'git': '03fa803d7e9fb14daa9a3089e0d1494eda75d986',
80 'svn': '337',
80 'svn': '337',
81 }
81 }
82 diff_stat = {
83 'git': '20 files changed: 941 inserted, 286 deleted',
84 'svn': '21 files changed: 943 inserted, 288 deleted',
85 'hg': '21 files changed: 943 inserted, 288 deleted',
86
87 }
82 commit_id = commit_id[backend.alias]
88 commit_id = commit_id[backend.alias]
83 response = self.app.get(route_path(
89 response = self.app.get(route_path(
84 'repo_commit',
90 'repo_commit',
85 repo_name=backend.repo_name, commit_id=commit_id))
91 repo_name=backend.repo_name, commit_id=commit_id))
86
92
87 response.mustcontain(_shorten_commit_id(commit_id))
93 response.mustcontain(_shorten_commit_id(commit_id))
88 response.mustcontain('21 files changed: 943 inserted, 288 deleted')
94 response.mustcontain(diff_stat[backend.alias])
89
95
90 # files op files
96 # files op files
91 response.mustcontain('File not present at commit: %s' %
97 response.mustcontain('File not present at commit: %s' %
@@ -127,6 +133,10 b' class TestRepoCommitView(object):'
127 response.mustcontain('1 file changed: 5 inserted, 1 deleted')
133 response.mustcontain('1 file changed: 5 inserted, 1 deleted')
128 response.mustcontain('12 files changed: 236 inserted, 22 deleted')
134 response.mustcontain('12 files changed: 236 inserted, 22 deleted')
129 response.mustcontain('21 files changed: 943 inserted, 288 deleted')
135 response.mustcontain('21 files changed: 943 inserted, 288 deleted')
136 elif backend.alias == 'git':
137 response.mustcontain('new file 100644')
138 response.mustcontain('12 files changed: 222 inserted, 20 deleted')
139 response.mustcontain('20 files changed: 941 inserted, 286 deleted')
130 else:
140 else:
131 response.mustcontain('new file 100644')
141 response.mustcontain('new file 100644')
132 response.mustcontain('12 files changed: 222 inserted, 20 deleted')
142 response.mustcontain('12 files changed: 222 inserted, 20 deleted')
@@ -170,6 +180,9 b' class TestRepoCommitView(object):'
170 if backend.alias == 'svn':
180 if backend.alias == 'svn':
171 response.mustcontain('new file 10644')
181 response.mustcontain('new file 10644')
172 response.mustcontain('32 files changed: 1179 inserted, 310 deleted')
182 response.mustcontain('32 files changed: 1179 inserted, 310 deleted')
183 elif backend.alias == 'git':
184 response.mustcontain('new file 100644')
185 response.mustcontain('31 files changed: 1163 inserted, 306 deleted')
173 else:
186 else:
174 response.mustcontain('new file 100644')
187 response.mustcontain('new file 100644')
175 response.mustcontain('32 files changed: 1165 inserted, 308 deleted')
188 response.mustcontain('32 files changed: 1165 inserted, 308 deleted')
@@ -246,7 +259,7 b' new file mode 120000'
246 """,
259 """,
247 'git': r"""diff --git a/README b/README
260 'git': r"""diff --git a/README b/README
248 new file mode 120000
261 new file mode 120000
249 index 0000000000000000000000000000000000000000..92cacd285355271487b7e379dba6ca60f9a554a4
262 index 0000000..92cacd2
250 --- /dev/null
263 --- /dev/null
251 +++ b/README
264 +++ b/README
252 @@ -0,0 +1 @@
265 @@ -0,0 +1 @@
@@ -102,7 +102,7 b' class TestCompareView(object):'
102 'git': {
102 'git': {
103 'tag': 'v0.2.2',
103 'tag': 'v0.2.2',
104 'branch': 'master',
104 'branch': 'master',
105 'response': (71, 2269, 3416)
105 'response': (70, 1855, 3002)
106 },
106 },
107 }
107 }
108
108
@@ -54,7 +54,7 b' class TestSideBySideDiff(object):'
54 'git': {
54 'git': {
55 'commits': ['6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
55 'commits': ['6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
56 '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
56 '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
57 'changes': '21 files changed: 943 inserted, 288 deleted'
57 'changes': '20 files changed: 941 inserted, 286 deleted'
58 },
58 },
59
59
60 'svn': {
60 'svn': {
@@ -92,7 +92,7 b' class TestSideBySideDiff(object):'
92 'git': {
92 'git': {
93 'commits': ['f5fbf9cfd5f1f1be146f6d3b38bcd791a7480c13',
93 'commits': ['f5fbf9cfd5f1f1be146f6d3b38bcd791a7480c13',
94 '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
94 '03fa803d7e9fb14daa9a3089e0d1494eda75d986'],
95 'changes': '32 files changed: 1165 inserted, 308 deleted'
95 'changes': '31 files changed: 1163 inserted, 306 deleted'
96 },
96 },
97
97
98 'svn': {
98 'svn': {
@@ -153,7 +153,7 b' class TestRepositoryGetDiff(BackendTestM'
153 first_commit_diffs = {
153 first_commit_diffs = {
154 'git': r"""diff --git a/foobar b/foobar
154 'git': r"""diff --git a/foobar b/foobar
155 new file mode 100644
155 new file mode 100644
156 index 0000000000000000000000000000000000000000..f6ea0495187600e7b2288c8ac19c5886383a4632
156 index 0000000..f6ea049
157 --- /dev/null
157 --- /dev/null
158 +++ b/foobar
158 +++ b/foobar
159 @@ -0,0 +1 @@
159 @@ -0,0 +1 @@
@@ -161,7 +161,7 b' index 0000000000000000000000000000000000'
161 \ No newline at end of file
161 \ No newline at end of file
162 diff --git a/foobar2 b/foobar2
162 diff --git a/foobar2 b/foobar2
163 new file mode 100644
163 new file mode 100644
164 index 0000000000000000000000000000000000000000..e8c9d6b98e3dce993a464935e1a53f50b56a3783
164 index 0000000..e8c9d6b
165 --- /dev/null
165 --- /dev/null
166 +++ b/foobar2
166 +++ b/foobar2
167 @@ -0,0 +1 @@
167 @@ -0,0 +1 @@
@@ -206,7 +206,7 b' new file mode 10644'
206
206
207 second_commit_diffs = {
207 second_commit_diffs = {
208 'git': r"""diff --git a/foobar b/foobar
208 'git': r"""diff --git a/foobar b/foobar
209 index f6ea0495187600e7b2288c8ac19c5886383a4632..389865bb681b358c9b102d79abd8d5f941e96551 100644
209 index f6ea049..389865b 100644
210 --- a/foobar
210 --- a/foobar
211 +++ b/foobar
211 +++ b/foobar
212 @@ -1 +1 @@
212 @@ -1 +1 @@
@@ -216,7 +216,7 b' index f6ea0495187600e7b2288c8ac19c588638'
216 \ No newline at end of file
216 \ No newline at end of file
217 diff --git a/foobar3 b/foobar3
217 diff --git a/foobar3 b/foobar3
218 new file mode 100644
218 new file mode 100644
219 index 0000000000000000000000000000000000000000..c11c37d41d33fb47741cff93fa5f9d798c1535b0
219 index 0000000..c11c37d
220 --- /dev/null
220 --- /dev/null
221 +++ b/foobar3
221 +++ b/foobar3
222 @@ -0,0 +1 @@
222 @@ -0,0 +1 @@
@@ -264,14 +264,14 b' new file mode 10644'
264 third_commit_diffs = {
264 third_commit_diffs = {
265 'git': r"""diff --git a/foobar b/foobar
265 'git': r"""diff --git a/foobar b/foobar
266 deleted file mode 100644
266 deleted file mode 100644
267 index 389865bb681b358c9b102d79abd8d5f941e96551..0000000000000000000000000000000000000000
267 index 389865b..0000000
268 --- a/foobar
268 --- a/foobar
269 +++ /dev/null
269 +++ /dev/null
270 @@ -1 +0,0 @@
270 @@ -1 +0,0 @@
271 -FOOBAR
271 -FOOBAR
272 \ No newline at end of file
272 \ No newline at end of file
273 diff --git a/foobar3 b/foobar3
273 diff --git a/foobar3 b/foobar3
274 index c11c37d41d33fb47741cff93fa5f9d798c1535b0..f9324477362684ff692aaf5b9a81e01b9e9a671c 100644
274 index c11c37d..f932447 100644
275 --- a/foobar3
275 --- a/foobar3
276 +++ b/foobar3
276 +++ b/foobar3
277 @@ -1 +1,3 @@
277 @@ -1 +1,3 @@
@@ -324,7 +324,7 b' diff --git a/foobar3 b/foobar3'
324 first_commit_one_file = {
324 first_commit_one_file = {
325 'git': r"""diff --git a/foobar b/foobar
325 'git': r"""diff --git a/foobar b/foobar
326 new file mode 100644
326 new file mode 100644
327 index 0000000000000000000000000000000000000000..f6ea0495187600e7b2288c8ac19c5886383a4632
327 index 0000000..f6ea049
328 --- /dev/null
328 --- /dev/null
329 +++ b/foobar
329 +++ b/foobar
330 @@ -0,0 +1 @@
330 @@ -0,0 +1 @@
@@ -352,7 +352,7 b' new file mode 10644'
352 }
352 }
353
353
354
354
355 class TestSvnGetDiff:
355 class TestSvnGetDiff(object):
356
356
357 @pytest.mark.parametrize('path, path1', [
357 @pytest.mark.parametrize('path, path1', [
358 ('trunk/example.py', 'tags/v0.2/example.py'),
358 ('trunk/example.py', 'tags/v0.2/example.py'),
@@ -451,10 +451,10 b' new file mode 100644'
451 index 0000000000000000000000000000000000000000..28380fd4a25c58be1b68b523ba2a314f4459ee9c
451 index 0000000000000000000000000000000000000000..28380fd4a25c58be1b68b523ba2a314f4459ee9c
452 GIT binary patch
452 GIT binary patch
453 literal 19
453 literal 19
454 YcmeAS@N?(olHy`uVBq!ia0vp^03%2O-T(jq
454 Yc%17D@N?(olHy`uVBq!ia0vp^03%2O-T(jq
455
455
456 literal 0
456 literal 0
457 HcmV?d00001
457 Hc$@<O00001
458
458
459 """,
459 """,
460 'hg': """diff --git a/image.png b/image.png
460 'hg': """diff --git a/image.png b/image.png
@@ -486,10 +486,10 b' new file mode 10644'
486 index 28380fd4a25c58be1b68b523ba2a314f4459ee9c..1008a77cd372386a1c24fbd96019333f67ad0065 100644
486 index 28380fd4a25c58be1b68b523ba2a314f4459ee9c..1008a77cd372386a1c24fbd96019333f67ad0065 100644
487 GIT binary patch
487 GIT binary patch
488 literal 19
488 literal 19
489 acmeAS@N?(olHy`uVBq!ia0y~$U;qFkO9I~j
489 ac%17D@N?(olHy`uVBq!ia0y~$U;qFkO9I~j
490
490
491 literal 19
491 literal 19
492 YcmeAS@N?(olHy`uVBq!ia0vp^03%2O-T(jq
492 Yc%17D@N?(olHy`uVBq!ia0vp^03%2O-T(jq
493
493
494 """,
494 """,
495 'hg': """diff --git a/image.png b/image.png
495 'hg': """diff --git a/image.png b/image.png
@@ -520,10 +520,10 b' deleted file mode 100644'
520 index 1008a77cd372386a1c24fbd96019333f67ad0065..0000000000000000000000000000000000000000
520 index 1008a77cd372386a1c24fbd96019333f67ad0065..0000000000000000000000000000000000000000
521 GIT binary patch
521 GIT binary patch
522 literal 0
522 literal 0
523 HcmV?d00001
523 Hc$@<O00001
524
524
525 literal 19
525 literal 19
526 acmeAS@N?(olHy`uVBq!ia0y~$U;qFkO9I~j
526 ac%17D@N?(olHy`uVBq!ia0y~$U;qFkO9I~j
527
527
528 """,
528 """,
529 'hg': """diff --git a/image.png b/image.png
529 'hg': """diff --git a/image.png b/image.png
General Comments 0
You need to be logged in to leave comments. Login now