Raise ValueError if credentials and developerKey are both specified (#358)
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index 89b0dd7..8818f4a 100644
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -375,6 +375,13 @@
build(
'plus', 'v1', http=http, credentials=mock.sentinel.credentials)
+ def test_credentials_and_developer_key_mutually_exclusive(self):
+ http = HttpMock(datafile('plus.json'), {'status': '200'})
+ with self.assertRaises(ValueError):
+ build(
+ 'plus', 'v1', credentials=mock.sentinel.credentials,
+ developerKey=mock.sentinel.credentials)
+
class DiscoveryFromDocument(unittest.TestCase):
MOCK_CREDENTIALS = mock.Mock(spec=google.auth.credentials.Credentials)