summaryrefslogtreecommitdiffstats
path: root/python/tests/fixtures.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-08 14:35:46 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-08 14:35:46 -0800
commitd1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e (patch)
tree7e84e4848ecbe2d2c5e013c2f16eb19ada634b13 /python/tests/fixtures.py
parentfc74ae5843d78fd072fbdce483db4608577a4794 (diff)
downloadfatcat-d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e.tar.gz
fatcat-d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e.zip
start updating importer auth with crossref importer
Diffstat (limited to 'python/tests/fixtures.py')
-rw-r--r--python/tests/fixtures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/tests/fixtures.py b/python/tests/fixtures.py
index c415abef..6a880c48 100644
--- a/python/tests/fixtures.py
+++ b/python/tests/fixtures.py
@@ -4,12 +4,14 @@ import time
import json
import signal
import pytest
+from dotenv import load_dotenv
import fatcat_web
import fatcat_client
@pytest.fixture
def full_app():
+ load_dotenv(dotenv_path="./env.example")
fatcat_web.app.testing = True
fatcat_web.app.debug = False
return fatcat_web.app
@@ -20,9 +22,10 @@ def app(full_app):
@pytest.fixture
def api():
+ load_dotenv(dotenv_path="./env.example")
conf = fatcat_client.Configuration()
conf.host = "http://localhost:9411/v0"
- conf.api_key["Authorization"] = "AgEPZGV2LmZhdGNhdC53aWtpAg4yMDE4LTEyLTMxLWRldgACJmVkaXRvcl9pZCA9IGFhYWFhYWFhYWFhYWJrdmthYWFhYWFhYWFlAAIeY3JlYXRlZCA9IDIwMTgtMTItMzFUMjE6MTU6NDdaAAAGIMWFZeZ54pH4OzNl5+U5X3p1H1rMioSuIldihuiM5XAw"
+ conf.api_key["Authorization"] = os.getenv("FATCAT_API_AUTH_TOKEN")
conf.api_key_prefix["Authorization"] = "Bearer"
api_client = fatcat_client.DefaultApi(fatcat_client.ApiClient(conf))
return api_client