def test_get_available_app_links_only_services_2(self, *args): assembled_specs = { 'apps': { 'app-a': get_app_dusty_schema( { 'depends': { 'apps': ['app-b'] }, 'conditional_links': { 'services': ['ser-b'] } }, name='app-a'), 'app-b': get_app_dusty_schema({'depends': {}}, name='app-b') }, 'services': { 'ser-b': { 'depends': {} } } } self.assertEqual(_conditional_links(assembled_specs, 'app-a'), ['ser-b'])
def test_get_available_app_links_no_services_1(self, *args): assembled_specs = {'apps': { 'app-a': get_app_dusty_schema({ 'depends': { 'apps': ['app-b'] }, 'conditional_links': { 'apps':['app-c'] } }), 'app-b': get_app_dusty_schema({ 'depends': {} }) }} self.assertEqual(_conditional_links(assembled_specs, 'app-a'), [])
def test_get_available_app_links_no_services_1(self, *args): assembled_specs = { 'apps': { 'app-a': get_app_dusty_schema({ 'depends': { 'apps': ['app-b'] }, 'conditional_links': { 'apps': ['app-c'] } }), 'app-b': get_app_dusty_schema({'depends': {}}) } } self.assertEqual(_conditional_links(assembled_specs, 'app-a'), [])