We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cd0268 commit f241636Copy full SHA for f241636
functions/slack/main_test.py
@@ -12,21 +12,19 @@
12
# limitations under the License.
13
14
import json
15
-import os
16
17
import apiclient
18
import mock
19
import pytest
20
21
import main
22
23
-API_KEY = os.environ['API_KEY']
24
-
25
with open('config.json', 'r') as f:
26
data = f.read()
27
config = json.loads(data)
28
29
-kg_search = apiclient.discovery.build('kgsearch', 'v1', developerKey=API_KEY)
+kg_search = apiclient.discovery.build('kgsearch', 'v1',
+ developerKey=config['KG_API_KEY'])
30
example_response = kg_search.entities().search(query='lion', limit=1).execute()
31
32
0 commit comments