Skip to content

Commit

Permalink
- failed tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-andriy committed Nov 28, 2024
1 parent e5c330a commit 3fc6784
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions addon_imps/storage/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ async def build_wb_config(self) -> dict:
return {
"owner": workspace_slug,
"repo": repo_slug,
"host": "api.bitbucket.org",
}
elif item_type_str == "workspace":
raise ValueError(
"Cannot build WaterButler config without a repository selected."
)
return {
"owner": actual_id,
"host": "api.bitbucket.org",
}
else:
raise ValueError(
f"Unsupported item type for build_wb_config: {item_type_str}"
Expand Down
6 changes: 3 additions & 3 deletions addon_imps/tests/storage/test_bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ async def test_build_wb_config_repository(self):
result = await self.imp.build_wb_config()

expected_result = {
"workspace": self.WORKSPACE,
"repo_slug": self.REPO,
"owner": self.WORKSPACE,
"repo": self.REPO,
"host": "api.bitbucket.org",
}
self.assertEqual(result, expected_result)
Expand All @@ -328,7 +328,7 @@ async def test_build_wb_config_workspace(self):
result = await self.imp.build_wb_config()

expected_result = {
"workspace": self.WORKSPACE,
"owner": self.WORKSPACE,
"host": "api.bitbucket.org",
}
self.assertEqual(result, expected_result)
Expand Down

0 comments on commit 3fc6784

Please sign in to comment.