Example #1
0
 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'])
Example #2
0
File: test.py Project: apeace/dusty
 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'), [])
Example #3
0
 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'), [])