Skip to content

Commit

Permalink
Merge baef5e1 into 2fbc43a
Browse files Browse the repository at this point in the history
  • Loading branch information
maretskiy committed Dec 30, 2016
2 parents 2fbc43a + baef5e1 commit ee55c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions notify/drivers/sfdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
import requests
from requests.packages.urllib3 import exceptions as urllib_exc

from notify import config
from notify import driver

requests.packages.urllib3.disable_warnings(urllib_exc.InsecureRequestWarning)


LOG = logging.getLogger("sfdc")
LOG.setLevel(config.get_config().get("logging", {}).get("level", "INFO"))
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.INFO)


class OAuth2(object):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/drivers/test_sfdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def test__request_with_empty_response(self, mock_log, mock_requests):
@mock.patch("notify.drivers.sfdc.requests")
@mock.patch("notify.drivers.sfdc.LOG")
def test__request_json_raises(self, mock_log, mock_requests):
mock_resp = mock.Mock(status_code=200, text="")
mock_resp.json.sode_effect = ValueError
mock_resp = mock.Mock(status_code=200, text="some response body")
mock_resp.json.side_effect = ValueError
mock_requests.request.return_value = mock_resp

client = sfdc.Client(self.auth)
Expand Down

0 comments on commit ee55c7c

Please sign in to comment.