예제 #1
0
    def test_run_flow_no_webserver_exchange_error(self, input_mock,
                                                  logging_mock):
        input_mock.return_value = 'auth_code'
        self.flow.step2_exchange.side_effect = client.FlowExchangeError()

        # Error while exchanging.
        with self.assertRaises(SystemExit):
            tools.run_flow(self.flow, self.storage, flags=self.flags)

        self.flow.step2_exchange.assert_called_once_with('auth_code',
                                                         http=None)
예제 #2
0
 def local_throws(code):
     raise client.FlowExchangeError('test')
예제 #3
0
 def step2_exchange(self, auth_code):
     raise GoogleClient.FlowExchangeError("mock error")