Esempio n. 1
0
 def test_db_show2(self, mock_get_db_driver):
     db_driver = mock_get_db_driver("elasticsearch", backend="")
     db_driver.db_show.return_value = {"databaase": "freezer"}
     sys.argv = ["freezer-manage", "db", "show"]
     freezer_manage.main()
     self.assertTrue(db_driver.db_show.called)
Esempio n. 2
0
 def test_db_remove(self, mock_get_db_driver):
     db_driver = mock_get_db_driver("elasticsearch", backend="")
     db_driver.db_remove.return_value = mock.MagicMock()
     sys.argv = ["freezer-manage", "db", "remove"]
     freezer_manage.main()
     self.assertTrue(db_driver.db_remove.called)