Skip to content

Commit

Permalink
Edit unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanholmes committed Jul 16, 2024
1 parent b97af18 commit 65f596a
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -19,9 +19,23 @@ def mock_post(self, mocker):

@pytest.fixture()
def driver(self):
os.environ["GT_CLOUD_BASE_URL"] = "https://cloud123.griptape.ai"
environ = {
"GT_CLOUD_BASE_URL": "https://cloud123.griptape.ai",
"GT_CLOUD_API_KEY": "foo bar",
"GT_CLOUD_STRUCTURE_RUN_ID": "bar baz",
}
original_environ = {}
for key, value in environ.items():
original_environ[key] = os.environ.get(key)
os.environ[key] = value

return GriptapeCloudEventListenerDriver(api_key="foo bar", structure_run_id="bar baz")
yield GriptapeCloudEventListenerDriver(api_key="foo bar", structure_run_id="bar baz")

for key, value in original_environ.items():
if value is None:
del os.environ[key]
else:
os.environ[key] = value

def test_init(self, driver):
assert driver

0 comments on commit 65f596a

Please sign in to comment.