##// 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 38 pull_request = pr_util.create_pull_request(mergeable=True)
39 39 id_, params = build_data(
40 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 43 response = api_call(self.app, params)
44 44
@@ -79,13 +79,19 b' class TestRepoCommitView(object):'
79 79 'git': '03fa803d7e9fb14daa9a3089e0d1494eda75d986',
80 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 88 commit_id = commit_id[backend.alias]
83 89 response = self.app.get(route_path(
84 90 'repo_commit',
85 91 repo_name=backend.repo_name, commit_id=commit_id))
86 92
87 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 96 # files op files
91 97 response.mustcontain('File not present at commit: %s' %
@@ -127,6 +133,10 b' class TestRepoCommitView(object):'
127 133 response.mustcontain('1 file changed: 5 inserted, 1 deleted')
128 134 response.mustcontain('12 files changed: 236 inserted, 22 deleted')
129 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 140 else:
131 141 response.mustcontain('new file 100644')
132 142 response.mustcontain('12 files changed: 222 inserted, 20 deleted')
@@ -170,6 +180,9 b' class TestRepoCommitView(object):'
170 180 if backend.alias == 'svn':
171 181 response.mustcontain('new file 10644')
172 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 186 else:
174 187 response.mustcontain('new file 100644')
175 188 response.mustcontain('32 files changed: 1165 inserted, 308 deleted')
@@ -246,7 +259,7 b' new file mode 120000'
246 259 """,
247 260 'git': r"""diff --git a/README b/README
248 261 new file mode 120000
249 index 0000000000000000000000000000000000000000..92cacd285355271487b7e379dba6ca60f9a554a4
262 index 0000000..92cacd2
250 263 --- /dev/null
251 264 +++ b/README
252 265 @@ -0,0 +1 @@
@@ -102,7 +102,7 b' class TestCompareView(object):'
102 102 'git': {
103 103 'tag': 'v0.2.2',
104 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 54 'git': {
55 55 'commits': ['6fc9270775aaf5544c1deb014f4ddd60c952fcbb',
56 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 60 'svn': {
@@ -92,7 +92,7 b' class TestSideBySideDiff(object):'
92 92 'git': {
93 93 'commits': ['f5fbf9cfd5f1f1be146f6d3b38bcd791a7480c13',
94 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 98 'svn': {
@@ -153,7 +153,7 b' class TestRepositoryGetDiff(BackendTestM'
153 153 first_commit_diffs = {
154 154 'git': r"""diff --git a/foobar b/foobar
155 155 new file mode 100644
156 index 0000000000000000000000000000000000000000..f6ea0495187600e7b2288c8ac19c5886383a4632
156 index 0000000..f6ea049
157 157 --- /dev/null
158 158 +++ b/foobar
159 159 @@ -0,0 +1 @@
@@ -161,7 +161,7 b' index 0000000000000000000000000000000000'
161 161 \ No newline at end of file
162 162 diff --git a/foobar2 b/foobar2
163 163 new file mode 100644
164 index 0000000000000000000000000000000000000000..e8c9d6b98e3dce993a464935e1a53f50b56a3783
164 index 0000000..e8c9d6b
165 165 --- /dev/null
166 166 +++ b/foobar2
167 167 @@ -0,0 +1 @@
@@ -206,7 +206,7 b' new file mode 10644'
206 206
207 207 second_commit_diffs = {
208 208 'git': r"""diff --git a/foobar b/foobar
209 index f6ea0495187600e7b2288c8ac19c5886383a4632..389865bb681b358c9b102d79abd8d5f941e96551 100644
209 index f6ea049..389865b 100644
210 210 --- a/foobar
211 211 +++ b/foobar
212 212 @@ -1 +1 @@
@@ -216,7 +216,7 b' index f6ea0495187600e7b2288c8ac19c588638'
216 216 \ No newline at end of file
217 217 diff --git a/foobar3 b/foobar3
218 218 new file mode 100644
219 index 0000000000000000000000000000000000000000..c11c37d41d33fb47741cff93fa5f9d798c1535b0
219 index 0000000..c11c37d
220 220 --- /dev/null
221 221 +++ b/foobar3
222 222 @@ -0,0 +1 @@
@@ -264,14 +264,14 b' new file mode 10644'
264 264 third_commit_diffs = {
265 265 'git': r"""diff --git a/foobar b/foobar
266 266 deleted file mode 100644
267 index 389865bb681b358c9b102d79abd8d5f941e96551..0000000000000000000000000000000000000000
267 index 389865b..0000000
268 268 --- a/foobar
269 269 +++ /dev/null
270 270 @@ -1 +0,0 @@
271 271 -FOOBAR
272 272 \ No newline at end of file
273 273 diff --git a/foobar3 b/foobar3
274 index c11c37d41d33fb47741cff93fa5f9d798c1535b0..f9324477362684ff692aaf5b9a81e01b9e9a671c 100644
274 index c11c37d..f932447 100644
275 275 --- a/foobar3
276 276 +++ b/foobar3
277 277 @@ -1 +1,3 @@
@@ -324,7 +324,7 b' diff --git a/foobar3 b/foobar3'
324 324 first_commit_one_file = {
325 325 'git': r"""diff --git a/foobar b/foobar
326 326 new file mode 100644
327 index 0000000000000000000000000000000000000000..f6ea0495187600e7b2288c8ac19c5886383a4632
327 index 0000000..f6ea049
328 328 --- /dev/null
329 329 +++ b/foobar
330 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 357 @pytest.mark.parametrize('path, path1', [
358 358 ('trunk/example.py', 'tags/v0.2/example.py'),
@@ -451,10 +451,10 b' new file mode 100644'
451 451 index 0000000000000000000000000000000000000000..28380fd4a25c58be1b68b523ba2a314f4459ee9c
452 452 GIT binary patch
453 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 456 literal 0
457 HcmV?d00001
457 Hc$@<O00001
458 458
459 459 """,
460 460 'hg': """diff --git a/image.png b/image.png
@@ -486,10 +486,10 b' new file mode 10644'
486 486 index 28380fd4a25c58be1b68b523ba2a314f4459ee9c..1008a77cd372386a1c24fbd96019333f67ad0065 100644
487 487 GIT binary patch
488 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 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 495 'hg': """diff --git a/image.png b/image.png
@@ -520,10 +520,10 b' deleted file mode 100644'
520 520 index 1008a77cd372386a1c24fbd96019333f67ad0065..0000000000000000000000000000000000000000
521 521 GIT binary patch
522 522 literal 0
523 HcmV?d00001
523 Hc$@<O00001
524 524
525 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 529 'hg': """diff --git a/image.png b/image.png
General Comments 0
You need to be logged in to leave comments. Login now