Skip to content

Commit

Permalink
Merge pull request #56 from datastax/feature/47-flexible-test-fixtures
Browse files Browse the repository at this point in the history
Create more flexible fixture-based test framework
  • Loading branch information
clun authored Oct 28, 2023
2 parents c51d9d0 + 0611433 commit f99adc6
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 118 deletions.
6 changes: 3 additions & 3 deletions astrapy/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@


class AstraDBOps:
def __init__(self, api_key, dev_ops_url=None):
def __init__(self, token, dev_ops_url=None):
dev_ops_url = dev_ops_url or DEFAULT_DEV_OPS_URL

self.api_key = "Bearer " + api_key
self.token = "Bearer " + token
self.base_url = f"https://{dev_ops_url}{DEFAULT_DEV_OPS_PATH_PREFIX}"

def _ops_request(self, method, path, options=None, json_data=None):
Expand All @@ -34,7 +34,7 @@ def _ops_request(self, method, path, options=None, json_data=None):
base_url=self.base_url,
method=method,
auth_header="Authorization",
api_key=self.api_key,
token=self.token,
json_data=json_data,
url_params=options,
path=path,
Expand Down
Loading

0 comments on commit f99adc6

Please sign in to comment.