Revision 2dc27ac1 snf-astakos-app/astakos/im/tests/projects.py
b/snf-astakos-app/astakos/im/tests/projects.py | ||
---|---|---|
46 | 46 |
"desc": "resource11 desc", |
47 | 47 |
"service_type": "type1", |
48 | 48 |
"service_origin": "service1", |
49 |
"allow_in_projects": True}
|
|
49 |
"ui_visible": True}
|
|
50 | 50 |
r, _ = register.add_resource(resource11) |
51 | 51 |
register.update_resources([(r, 100)]) |
52 | 52 |
resource12 = {"name": "service1.resource12", |
... | ... | |
74 | 74 |
"desc": "pend app desc", |
75 | 75 |
"service_type": "account", |
76 | 76 |
"service_origin": "astakos_account", |
77 |
"allow_in_projects": False} |
|
77 |
"ui_visible": False, |
|
78 |
"api_visible": False} |
|
78 | 79 |
r, _ = register.add_resource(pending_app) |
79 | 80 |
register.update_resources([(r, 3)]) |
80 | 81 |
|
... | ... | |
598 | 599 |
# astakos resources |
599 | 600 |
self.resource = Resource.objects.create(name="astakos.pending_app", |
600 | 601 |
uplimit=0, |
601 |
allow_in_projects=False, |
|
602 |
ui_visible=False, |
|
603 |
api_visible=False, |
|
602 | 604 |
service_type="astakos") |
603 | 605 |
|
604 | 606 |
# custom service resources |
... | ... | |
638 | 640 |
self.assertRedirects(r, reverse('project_add')) |
639 | 641 |
|
640 | 642 |
@im_settings(PROJECT_ADMINS=['uuid1']) |
641 |
def test_allow_in_project(self):
|
|
643 |
def test_ui_visible(self):
|
|
642 | 644 |
dfrom = datetime.now() |
643 | 645 |
dto = datetime.now() + timedelta(days=30) |
644 | 646 |
|
645 |
# astakos.pending_uplimit allow_in_project flag is False
|
|
647 |
# astakos.pending_app ui_visible flag is False
|
|
646 | 648 |
# we shouldn't be able to create a project application using this |
647 | 649 |
# resource. |
648 | 650 |
application_data = { |
Also available in: Unified diff