Пример #1
0
    def test_fetch_restorable_envs(self):
        self.mock_beanstalk.get_raw_app_environments.return_value = [self.env1, self.env2]

        environments = restoreops.get_restorable_envs(self.app)

        self.assertNotIn(self.env1, environments,
                         "Non-terminated environment returned in restorable environments when it should not be")
        self.assertIn(self.env2, environments, "Terminated environment not in restorable environments when it should be")
Пример #2
0
 def interactive_restore_environment(self):
     """
         Interactive mode which allows user to see previous
         environments and allow a choice to restore one.
         Run when the user supplies no arguments.
     """
     environments = restoreops.get_restorable_envs(self.get_app_name())
     restoreops.display_environments(environments)
Пример #3
0
 def interactive_restore_environment(self):
     """
         Interactive mode which allows user to see previous
         environments and allow a choice to restore one.
         Run when the user supplies no arguments.
     """
     environments = restoreops.get_restorable_envs(self.get_app_name())
     restoreops.display_environments(environments)