Skip to content

Commit 043fd70

Browse files
author
Jon Wayne Parrott
authored
Remove mutual exclusivity check for developerKey and credentials (googleapis#465)
1 parent 4406778 commit 043fd70

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

googleapiclient/discovery.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,6 @@ def build_from_document(
334334
if http is not None and credentials is not None:
335335
raise ValueError('Arguments http and credentials are mutually exclusive.')
336336

337-
if developerKey is not None and credentials is not None:
338-
raise ValueError(
339-
'Arguments developerKey and credentials are mutually exclusive.')
340-
341337
if isinstance(service, six.string_types):
342338
service = json.loads(service)
343339

tests/test_discovery.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,6 @@ def test_credentials_and_http_mutually_exclusive(self):
375375
build(
376376
'plus', 'v1', http=http, credentials=mock.sentinel.credentials)
377377

378-
def test_credentials_and_developer_key_mutually_exclusive(self):
379-
http = HttpMock(datafile('plus.json'), {'status': '200'})
380-
with self.assertRaises(ValueError):
381-
build(
382-
'plus', 'v1', credentials=mock.sentinel.credentials,
383-
developerKey=mock.sentinel.credentials)
384-
385378

386379
class DiscoveryFromDocument(unittest.TestCase):
387380
MOCK_CREDENTIALS = mock.Mock(spec=google.auth.credentials.Credentials)

0 commit comments

Comments
 (0)