Ejemplo n.º 1
0
def list_envs():
    """List all environments"""
    for env in lib.get_environments():
        margin_left = lib.get_margin(len(env['name']))
        print("{0}{1}{2}".format(
            env['name'], margin_left,
            env.get('description', '(no description)')))
Ejemplo n.º 2
0
def list_envs():
    """List all environments"""
    for env in lib.get_environments():
        margin_left = lib.get_margin(len(env['name']))
        print("{0}{1}{2}".format(env['name'], margin_left,
                                 env.get('description', '(no description)')))
Ejemplo n.º 3
0
 def test_get_environments(self):
     """Should get a list of all environments"""
     environments = lib.get_environments()
     self.assertEqual(sorted(env['name'] for env in environments),
                      ['production', 'staging'])
Ejemplo n.º 4
0
 def test_get_environments(self):
     """Should get a list of all environments"""
     environments = lib.get_environments()
     self.assertEqual(sorted(env['name'] for env in environments),
                      ['production', 'staging'])