def test_get_account_exception(self, mock_accessor): """Test that no account is returned upon exception.""" mock_accessor.side_effect = AccountsAccessorError( "Sample timeout error") ocp_account = msg_handler.get_account(self.ocp_test_provider_uuid, "test_request_id") self.assertIsNone(ocp_account)
def test_get_account(self): """Test that the account details are returned given a provider uuid.""" ocp_account = msg_handler.get_account(self.ocp_test_provider_uuid, "test_request_id") self.assertIsNotNone(ocp_account) self.assertEqual(ocp_account.get("provider_type"), Provider.PROVIDER_OCP)
def test_get_account(self): """Test that the account details are returned given a provider uuid.""" ocp_account = msg_handler.get_account(self.ocp_test_provider_uuid) self.assertIsNotNone(ocp_account) self.assertEqual(ocp_account.get('provider_type'), OPENSHIFT_CONTAINER_PLATFORM)