コード例 #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
ファイル: restore.py プロジェクト: mschmutz1/jokic
 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
ファイル: restore.py プロジェクト: dangjoeltang/SimpleShop
 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)