summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-31 18:44:24 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-31 18:44:24 -0800
commitab80106891e5eca1a400b095aa456ad53dce2f71 (patch)
treef15186dda1220d9b8f3a3e43d1cc86a5b624c731 /python
parentb292d25b3f29407e4a6c3c093bd15027da6d8d73 (diff)
downloadfatcat-ab80106891e5eca1a400b095aa456ad53dce2f71.tar.gz
fatcat-ab80106891e5eca1a400b095aa456ad53dce2f71.zip
add crude/manual auth token to python tests (fixing them)
Diffstat (limited to 'python')
-rw-r--r--python/shell.py15
-rw-r--r--python/tests/fixtures.py2
2 files changed, 14 insertions, 3 deletions
diff --git a/python/shell.py b/python/shell.py
index 78d32deb..ad92f4ae 100644
--- a/python/shell.py
+++ b/python/shell.py
@@ -28,14 +28,23 @@ if __name__ == '__main__':
admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae"
+ #fatcat_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
+ #fatcat_client.configuration.api_key_prefix['Authorization'] = 'Bearer'
local_conf = fatcat_client.Configuration()
+ local_conf.api_key["Authorization"] = "AgEPZGV2LmZhdGNhdC53aWtpAg4yMDE4LTEyLTMxLWRldgACJmVkaXRvcl9pZCA9IGFhYWFhYWFhYWFhYWJrdmthYWFhYWFhYWFlAAIeY3JlYXRlZCA9IDIwMTgtMTItMzFUMjE6MTU6NDdaAAAGIMWFZeZ54pH4OzNl5+U5X3p1H1rMioSuIldihuiM5XAw"
+ local_conf.api_key_prefix["Authorization"] = "Bearer"
local_conf.host = 'http://localhost:9411/v0'
+ local_conf.debug = True
local_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(local_conf))
- prod_conf = fatcat_client.Configuration()
- prod_conf.host = 'https://api.fatcat.wiki/v0'
- prod_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(prod_conf))
+ #prod_conf = fatcat_client.Configuration()
+ #local_conf.api_key["Authorization"] = "AgEPZGV2LmZhdGNhdC53aWtpAg4yMDE4LTEyLTMxLWRldgACJmVkaXRvcl9pZCA9IGFhYWFhYWFhYWFhYWJrdmthYWFhYWFhYWFlAAIeY3JlYXRlZCA9IDIwMTgtMTItMzFUMjE6MTU6NDdaAAAGIMWFZeZ54pH4OzNl5+U5X3p1H1rMioSuIldihuiM5XAw"
+ #local_conf.api_key_prefix["Authorization"] = "Bearer"
+ #prod_conf.host = 'https://api.fatcat.wiki/v0'
+ #prod_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(prod_conf))
qa_conf = fatcat_client.Configuration()
+ local_conf.api_key["Authorization"] = "AgEPZGV2LmZhdGNhdC53aWtpAg4yMDE4LTEyLTMxLWRldgACJmVkaXRvcl9pZCA9IGFhYWFhYWFhYWFhYWJrdmthYWFhYWFhYWFlAAIeY3JlYXRlZCA9IDIwMTgtMTItMzFUMjE6MTU6NDdaAAAGIMWFZeZ54pH4OzNl5+U5X3p1H1rMioSuIldihuiM5XAw"
+ local_conf.api_key_prefix["Authorization"] = "Bearer"
qa_conf.host = 'https://api.qa.fatcat.wiki/v0'
qa_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(qa_conf))
diff --git a/python/tests/fixtures.py b/python/tests/fixtures.py
index 567e9132..c415abef 100644
--- a/python/tests/fixtures.py
+++ b/python/tests/fixtures.py
@@ -22,6 +22,8 @@ def app(full_app):
def api():
conf = fatcat_client.Configuration()
conf.host = "http://localhost:9411/v0"
+ conf.api_key["Authorization"] = "AgEPZGV2LmZhdGNhdC53aWtpAg4yMDE4LTEyLTMxLWRldgACJmVkaXRvcl9pZCA9IGFhYWFhYWFhYWFhYWJrdmthYWFhYWFhYWFlAAIeY3JlYXRlZCA9IDIwMTgtMTItMzFUMjE6MTU6NDdaAAAGIMWFZeZ54pH4OzNl5+U5X3p1H1rMioSuIldihuiM5XAw"
+ conf.api_key_prefix["Authorization"] = "Bearer"
api_client = fatcat_client.DefaultApi(fatcat_client.ApiClient(conf))
return api_client