Skip to content

Commit

Permalink
add api secret
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Sep 26, 2024
1 parent b51f7d5 commit 7eedb95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ jobs:
- name: Test with unittest
run: |
poetry run python -m unittest discover
env:
API_KEY: ${{ secrets.API_KEY }}
7 changes: 6 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Testing Synchronous and Asynchronous Extraction"""

import os
import sys
import unittest

Expand All @@ -14,8 +15,12 @@ class TestAnyParser(unittest.TestCase):
"""Testing Any Parser"""

def setUp(self):
self.api_key = "..." # insert public API key
# get secret API key
self.api_key = os.environ.get("API_KEY")
if not self.api_key:
raise ValueError("API_KEY environment variable is not set")
self.file_path = "../examples/sample_data/stoxx_index_guide_0003.pdf"
# create instance of AnyParser
self.ap = AnyParser(self.api_key)

def test_sync_extract(self):
Expand Down

0 comments on commit 7eedb95

Please sign in to comment.