|
@@ -465,13 +465,13 @@ class TestWorkspaceContents(FunctionalTest):
|
465
|
465
|
assert set(content['sub_content_type_slug']) == set(['thread', 'page', 'folder', 'file'])
|
466
|
466
|
assert content['workspace_id'] == 1
|
467
|
467
|
|
468
|
|
- @pytest.mark.xfail()
|
|
468
|
+
|
469
|
469
|
def test_api__get_workspace_content__ok_200__get_only_active_folder_content(self):
|
470
|
470
|
"""
|
471
|
471
|
Check obtain workspace folder active contents
|
472
|
472
|
"""
|
473
|
473
|
params = {
|
474
|
|
- 'parent_id': 2, # TODO - G.M - 30-05-2018 - Find a real id
|
|
474
|
+ 'parent_id': 10,
|
475
|
475
|
'show_archived': 0,
|
476
|
476
|
'show_deleted': 0,
|
477
|
477
|
'show_active': 1,
|
|
@@ -484,23 +484,22 @@ class TestWorkspaceContents(FunctionalTest):
|
484
|
484
|
)
|
485
|
485
|
)
|
486
|
486
|
res = self.testapp.get(
|
487
|
|
- '/api/v2/workspaces/1/contents',
|
|
487
|
+ '/api/v2/workspaces/2/contents',
|
488
|
488
|
status=200,
|
489
|
489
|
params=params,
|
490
|
490
|
).json_body # nopep8
|
491
|
491
|
# TODO - G.M - 30-05-2018 - Check this test
|
492
|
492
|
raise NotImplementedError()
|
493
|
493
|
|
494
|
|
- @pytest.mark.xfail()
|
495
|
494
|
def test_api__get_workspace_content__ok_200__get_only_archived_folder_content(self):
|
496
|
495
|
"""
|
497
|
496
|
Check obtain workspace folder archived contents
|
498
|
497
|
"""
|
499
|
498
|
params = {
|
500
|
|
- 'parent_id': 2, # TODO - G.M - 30-05-2018 - Find a real id
|
501
|
|
- 'show_archived': 0,
|
|
499
|
+ 'parent_id': 10,
|
|
500
|
+ 'show_archived': 1,
|
502
|
501
|
'show_deleted': 0,
|
503
|
|
- 'show_active': 1,
|
|
502
|
+ 'show_active': 0,
|
504
|
503
|
}
|
505
|
504
|
self.testapp.authorization = (
|
506
|
505
|
'Basic',
|
|
@@ -510,23 +509,22 @@ class TestWorkspaceContents(FunctionalTest):
|
510
|
509
|
)
|
511
|
510
|
)
|
512
|
511
|
res = self.testapp.get(
|
513
|
|
- '/api/v2/workspaces/1/contents',
|
|
512
|
+ '/api/v2/workspaces/2/contents',
|
514
|
513
|
status=200,
|
515
|
514
|
params=params,
|
516
|
515
|
).json_body # nopep8
|
517
|
516
|
# TODO - G.M - 30-05-2018 - Check this test
|
518
|
517
|
raise NotImplementedError()
|
519
|
518
|
|
520
|
|
- @pytest.mark.xfail()
|
521
|
519
|
def test_api__get_workspace_content__ok_200__get_only_deleted_folder_content(self):
|
522
|
520
|
"""
|
523
|
521
|
Check obtain workspace folder deleted contents
|
524
|
522
|
"""
|
525
|
523
|
params = {
|
526
|
|
- 'parent_id': 2, # TODO - G.M - 30-05-2018 - Find a real id
|
|
524
|
+ 'parent_id': 10,
|
527
|
525
|
'show_archived': 0,
|
528
|
|
- 'show_deleted': 0,
|
529
|
|
- 'show_active': 1,
|
|
526
|
+ 'show_deleted': 1,
|
|
527
|
+ 'show_active': 0,
|
530
|
528
|
}
|
531
|
529
|
self.testapp.authorization = (
|
532
|
530
|
'Basic',
|
|
@@ -536,7 +534,7 @@ class TestWorkspaceContents(FunctionalTest):
|
536
|
534
|
)
|
537
|
535
|
)
|
538
|
536
|
res = self.testapp.get(
|
539
|
|
- '/api/v2/workspaces/1/contents',
|
|
537
|
+ '/api/v2/workspaces/2/contents',
|
540
|
538
|
status=200,
|
541
|
539
|
params=params,
|
542
|
540
|
).json_body # nopep8
|
|
@@ -549,7 +547,7 @@ class TestWorkspaceContents(FunctionalTest):
|
549
|
547
|
(archived, deleted, active) result should be empty list.
|
550
|
548
|
"""
|
551
|
549
|
params = {
|
552
|
|
- 'parent_id': 2, # TODO - G.M - 30-05-2018 - Find a real id
|
|
550
|
+ 'parent_id': 10,
|
553
|
551
|
'show_archived': 0,
|
554
|
552
|
'show_deleted': 0,
|
555
|
553
|
'show_active': 0,
|
|
@@ -562,7 +560,7 @@ class TestWorkspaceContents(FunctionalTest):
|
562
|
560
|
)
|
563
|
561
|
)
|
564
|
562
|
res = self.testapp.get(
|
565
|
|
- '/api/v2/workspaces/1/contents',
|
|
563
|
+ '/api/v2/workspaces/2/contents',
|
566
|
564
|
status=200,
|
567
|
565
|
params=params,
|
568
|
566
|
).json_body # nopep8
|