Skip to content

Commit

Permalink
Remove api keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mawandm committed Apr 5, 2024
1 parent b7d9b88 commit 6cd5d9f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
5 changes: 2 additions & 3 deletions nesis/api/tests/core/controllers/test_datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def get_admin_session(client):
"email": tests.admin_email,
}
# Create an admin user
# self.cloud_app.post(f"/v1/users", headers=tests.get_header(), data=json.dumps(admin_data))
return client.post(
f"/v1/sessions", headers=tests.get_header(), data=json.dumps(admin_data)
).json
Expand All @@ -45,8 +44,8 @@ def test_datasources(client):
"name": "finance6",
"connection": {
"user": "caikuodda",
"password": "Ze1kiepeemae6Oor0the",
"host": "resource-3372014368-postgres.ametnes-7706709222-8087383694",
"password": "some.password",
"host": "localhost",
"port": "5432",
"database": "initdb",
},
Expand Down
2 changes: 1 addition & 1 deletion nesis/api/tests/core/controllers/test_management_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def client():
session: Session = DBSession()
tests.clear_database(session)

os.environ["OPENAI_API_KEY"] = "sk-1fxWby2iaMsmITYpb4Kr"
os.environ["OPENAI_API_KEY"] = "some.api.key"

services.init_services(tests.config)
return cloud_app.test_client()
Expand Down
7 changes: 1 addition & 6 deletions nesis/api/tests/core/controllers/test_management_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def client():
session: Session = DBSession()
tests.clear_database(session)

os.environ["OPENAI_API_KEY"] = "sk-1fxWby2iaMsmITYpb4Kr"
os.environ["OPENAI_API_KEY"] = "some.api.key"

services.init_services(tests.config)
return cloud_app.test_client()
Expand Down Expand Up @@ -85,11 +85,6 @@ def test_create_users(client):
)
session = response.json

# Password not supplied
# response = self.cloud_app.post("/v1/users", headers=tests.get_header(),
# data=json.dumps({**user, 'email': '[email protected]'}))
# self.assertEqual(400, response.status_code, msg=response.json)

# No auth token supplied
response = client.post(
"/v1/users",
Expand Down
4 changes: 2 additions & 2 deletions nesis/api/tests/core/controllers/test_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def create_datasource(client, session):
"name": "finance6",
"connection": {
"user": "caikuodda",
"password": "Ze1kiepeemae6Oor0the",
"host": "resource-3372014368-postgres.ametnes-7706709222-8087383694",
"password": "some.password",
"host": "localhost",
"port": "5432",
"database": "initdb",
},
Expand Down
2 changes: 1 addition & 1 deletion nesis/api/tests/core/services/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create_datasource(token: str, name: str = None) -> Datasource:
"connection": {
"user": "caikuodda",
"password": "Ze1kiepeemae6Oor0the",
"host": "resource-3372014368-postgres.ametnes-7706709222-8087383694",
"host": "localhost",
"port": "5432",
"database": "initdb",
},
Expand Down

0 comments on commit 6cd5d9f

Please sign in to comment.