##// END OF EJS Templates
tests: Fixed ecpected results.
Martin Bornhold -
r462:e1f66798 default
parent child Browse files
Show More
@@ -308,16 +308,17 b' class TestCreateReferenceData:'
308 308 result = controller._create_reference_data(
309 309 repo, full_repo_name, example_refs)
310 310
311 expected_files_url = '/{}/files/'.format(full_repo_name)
311 312 expected_result = [
312 313 {
313 314 'children': [
314 315 {
315 316 'id': 'a', 'raw_id': 'a_id', 'text': 'a', 'type': 't1',
316 'files_url': '/test-repo/files/a/?at=a'
317 'files_url': expected_files_url + 'a/?at=a',
317 318 },
318 319 {
319 320 'id': 'b', 'raw_id': 'b_id', 'text': 'b', 'type': 't1',
320 'files_url': '/test-repo/files/b/?at=b'
321 'files_url': expected_files_url + 'b/?at=b',
321 322 }
322 323 ],
323 324 'text': 'section_1'
@@ -326,7 +327,7 b' class TestCreateReferenceData:'
326 327 'children': [
327 328 {
328 329 'id': 'c', 'raw_id': 'c_id', 'text': 'c', 'type': 't2',
329 'files_url': '/test-repo/files/c/?at=c'
330 'files_url': expected_files_url + 'c/?at=c',
330 331 }
331 332 ],
332 333 'text': 'section_2'
@@ -342,18 +343,19 b' class TestCreateReferenceData:'
342 343 result = controller._create_reference_data(
343 344 repo, full_repo_name, example_refs)
344 345
346 expected_files_url = '/{}/files/'.format(full_repo_name)
345 347 expected_result = [
346 348 {
347 349 'children': [
348 350 {
349 351 'id': 'a@a_id', 'raw_id': 'a_id',
350 352 'text': 'a', 'type': 't1',
351 'files_url': '/test-repo/files/a_id/a?at=a'
353 'files_url': expected_files_url + 'a_id/a?at=a',
352 354 },
353 355 {
354 356 'id': 'b@b_id', 'raw_id': 'b_id',
355 357 'text': 'b', 'type': 't1',
356 'files_url': '/test-repo/files/b_id/b?at=b'
358 'files_url': expected_files_url + 'b_id/b?at=b',
357 359 }
358 360 ],
359 361 'text': 'section_1'
@@ -363,7 +365,7 b' class TestCreateReferenceData:'
363 365 {
364 366 'id': 'c@c_id', 'raw_id': 'c_id',
365 367 'text': 'c', 'type': 't2',
366 'files_url': '/test-repo/files/c_id/c?at=c'
368 'files_url': expected_files_url + 'c_id/c?at=c',
367 369 }
368 370 ],
369 371 'text': 'section_2'
@@ -509,7 +511,8 b' class TestReferenceItems(object):'
509 511 self.repo, self.repo_full_name, refs, self.ref_type,
510 512 self._format_function)
511 513
512 url_mock.assert_called_once_with(self.repo, ref_name, ref_id, False)
514 url_mock.assert_called_once_with(
515 self.repo, self.repo_full_name, ref_name, ref_id, False)
513 516 expected_result = [
514 517 {
515 518 'text': ref_name,
General Comments 0
You need to be logged in to leave comments. Login now