Skip to content

Commit

Permalink
temp test fixes (#3682)
Browse files Browse the repository at this point in the history
* fix discord test

* Fix discord test

* fixed fireflies test too
  • Loading branch information
hagen-danswer authored Jan 15, 2025
1 parent b401f83 commit eb70699
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
12 changes: 4 additions & 8 deletions backend/tests/daily/connectors/discord/test_discord_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,13 @@ def load_test_data(file_name: str = "test_discord_data.json") -> dict[str, Any]:
@pytest.fixture
def discord_connector() -> DiscordConnector:
connector = DiscordConnector()
connector.load_credentials(get_credentials())
connector.load_credentials({"discord_bot_token": os.environ["DISCORD_BOT_TOKEN"]})
return connector


def get_credentials() -> dict[str, str]:
token = os.environ.get("DISCORD_BOT_TOKEN")
if token is None:
raise ValueError("DISCORD_BOT_TOKEN is not set")
return {"discord_bot_token": token}


@pytest.mark.xfail(
reason="Environment variable not set for some reason",
)
def test_discord_connector_basic(discord_connector: DiscordConnector) -> None:
test_data = load_test_data()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ def load_test_data(file_name: str = "test_fireflies_data.json") -> dict[str, Any
@pytest.fixture
def fireflies_connector() -> FirefliesConnector:
connector = FirefliesConnector()
connector.load_credentials(get_credentials())
connector.load_credentials(
{"fireflies_api_key": os.environ["FIREFLIES_API_KEY"]},
)
return connector


def get_credentials() -> dict[str, str]:
return {
"fireflies_api_key": os.environ["FIREFLIES_API_KEY"],
}


@pytest.mark.xfail(
reason="Environment variable not set for some reason",
)
def test_fireflies_connector_basic(fireflies_connector: FirefliesConnector) -> None:
test_data = load_test_data()

Expand Down

0 comments on commit eb70699

Please sign in to comment.