Skip to content

Commit

Permalink
added test back
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak5598 committed Jun 12, 2024
1 parent b863b25 commit 5855643
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/plugins/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ def set_up(self, mocker):
)
yield

@pytest.mark.asyncio
async def test_no_project(self, mocker):
mocker.patch.dict(self.project_plugin.project_data, {})

mock_command = mocker.AsyncMock()
mock_command.text = "xyx"
mock_command.say = mocker.AsyncMock()

await self.project_plugin.project(mock_command)

mock_command.say.assert_called_once_with(
"Hello, the project 'xyx' is not recognized. Please try different query."
)
mock_command.reset_mock()

@pytest.mark.asyncio
async def test_project(self, mocker):
mocker.patch.dict(
Expand Down

0 comments on commit 5855643

Please sign in to comment.