def _prepare_mock_account(self):
    mock_storage = mock.MagicMock()
    mock_account = mock.MagicMock()
    mock_regr = mock.MagicMock()
    mock_storage.find_all.return_value = [mock_account]
    self.mocks['account'].AccountFileStorage.return_value = mock_storage
    mock_account.regr.body = mock_regr.body
    self.mocks['determine_account'].return_value = (mock_account, mock.MagicMock())
    return (mock_account, mock_storage, mock_regr)
def _prepare_mock_account(self):
    mock_storage = mock.MagicMock()
    mock_account = mock.MagicMock()
    mock_regr = mock.MagicMock()
    mock_storage.find_all.return_value = [mock_account]
    self.mocks['account'].AccountFileStorage.return_value = mock_storage
    mock_account.regr.body = mock_regr.body
    self.mocks['determine_account'].return_value = (mock_account, mock.MagicMock())
    return (mock_account, mock_storage, mock_regr)