diff --git a/integration/test_accounts.py b/integration/test_accounts.py index bfade561..114fe572 100644 --- a/integration/test_accounts.py +++ b/integration/test_accounts.py @@ -11,12 +11,10 @@ "body": b } - HOST = os.environ["SCRUNCH_HOST"] -username = os.environ["SCRUNCH_USER"] -password = os.environ["SCRUNCH_PASS"] +api_key = os.environ["SCRUNCH_APIKEY"] -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST diff --git a/integration/test_backfill.py b/integration/test_backfill.py index 893c70c6..584d0224 100644 --- a/integration/test_backfill.py +++ b/integration/test_backfill.py @@ -9,13 +9,10 @@ from scrunch import connect from scrunch.mutable_dataset import get_mutable_dataset +HOST = os.environ["SCRUNCH_HOST"] +api_key = os.environ["SCRUNCH_APIKEY"] -HOST = os.environ['SCRUNCH_HOST'] -username = os.environ['SCRUNCH_USER'] -password = os.environ['SCRUNCH_PASS'] - - -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST as_entity = lambda b: { diff --git a/integration/test_dataset.py b/integration/test_dataset.py index b9d90c2c..c93b928d 100644 --- a/integration/test_dataset.py +++ b/integration/test_dataset.py @@ -6,12 +6,10 @@ from scrunch import connect from scrunch.mutable_dataset import get_mutable_dataset -HOST = os.environ['SCRUNCH_HOST'] -username = os.environ['SCRUNCH_USER'] -password = os.environ['SCRUNCH_PASS'] +HOST = os.environ["SCRUNCH_HOST"] +api_key = os.environ["SCRUNCH_APIKEY"] - -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST as_entity = lambda b: { diff --git a/integration/test_folders.py b/integration/test_folders.py index a56a67b0..8a25e2b8 100644 --- a/integration/test_folders.py +++ b/integration/test_folders.py @@ -18,12 +18,11 @@ from scrunch.exceptions import InvalidPathError from scrunch.folders import Folder +HOST = os.environ["SCRUNCH_HOST"] +api_key = os.environ["SCRUNCH_APIKEY"] -HOST = os.environ['SCRUNCH_HOST'] -username = os.environ['SCRUNCH_USER'] -password = os.environ['SCRUNCH_PASS'] - -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) +assert site is not None, "Unable to connect to %s" % HOST def setup_folders(ds): diff --git a/integration/test_projects.py b/integration/test_projects.py index 5aa5f4ca..6228a9ac 100644 --- a/integration/test_projects.py +++ b/integration/test_projects.py @@ -10,12 +10,11 @@ HOST = os.environ['SCRUNCH_HOST'] -username = os.environ['SCRUNCH_USER'] -password = os.environ['SCRUNCH_PASS'] +api_key = os.environ["SCRUNCH_APIKEY"] +api_key2 = os.environ["SCRUNCH_APIKEY2"] username2 = os.environ['SCRUNCH_USER2'] -password2 = os.environ['SCRUNCH_PASS2'] -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) UNIQUE_PREFIX = str(datetime.now()).replace(':', '').replace('.', '') FEATURE_FLAG = 'old_projects_order' @@ -76,7 +75,7 @@ def test_reorder(self): def test_move_dataset(self): fo = get_user(username2) - fo_site = connect(fo.email, password2, HOST) + fo_site = connect(api_key=api_key2, site_url=HOST) # These two datasets are created by the default logged user _ds1 = site.datasets.create(shoji_entity_wrapper({ diff --git a/integration/test_recodes.py b/integration/test_recodes.py index 0667baa1..30721a4f 100644 --- a/integration/test_recodes.py +++ b/integration/test_recodes.py @@ -17,13 +17,10 @@ from scrunch.mutable_dataset import get_mutable_dataset from pycrunch.importing import Importer +HOST = os.environ["SCRUNCH_HOST"] +api_key = os.environ["SCRUNCH_APIKEY"] -HOST = os.environ['SCRUNCH_HOST'] -username = os.environ['SCRUNCH_USER'] -password = os.environ['SCRUNCH_PASS'] - - -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST diff --git a/integration/test_scripts.py b/integration/test_scripts.py index be32486b..0a4aceca 100644 --- a/integration/test_scripts.py +++ b/integration/test_scripts.py @@ -7,12 +7,10 @@ from scrunch.scripts import ScriptExecutionError from scrunch.mutable_dataset import get_mutable_dataset - HOST = os.environ["SCRUNCH_HOST"] -username = os.environ["SCRUNCH_USER"] -password = os.environ["SCRUNCH_PASS"] +api_key = os.environ["SCRUNCH_APIKEY"] -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST as_entity = lambda b: { diff --git a/integration/test_views.py b/integration/test_views.py index f5ea72f6..3fc2699d 100644 --- a/integration/test_views.py +++ b/integration/test_views.py @@ -6,10 +6,9 @@ from scrunch.mutable_dataset import get_mutable_dataset HOST = os.environ["SCRUNCH_HOST"] -username = os.environ["SCRUNCH_USER"] -password = os.environ["SCRUNCH_PASS"] +api_key = os.environ["SCRUNCH_APIKEY"] -site = connect(username, password, HOST) +site = connect(api_key=api_key, site_url=HOST) assert site is not None, "Unable to connect to %s" % HOST as_entity = lambda b: {