Skip to content

Commit

Permalink
Fixes to web app test
Browse files Browse the repository at this point in the history
  • Loading branch information
paulovcmedeiros committed Feb 25, 2024
1 parent d5fe814 commit f54024a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/smoke/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@


def test_app(mocker, default_voice_chat_configs):
mocker.patch("streamlit.session_state", {})
class MockAttrDict(dict):
def __getattr__(self, attr):
return self.get(attr, mocker.MagicMock())

def __setattr__(self, attr, value):
self[attr] = value

mocker.patch("streamlit.session_state", MockAttrDict())
mocker.patch("streamlit.chat_input", return_value="foobar")
mocker.patch(
"pyrobbot.chat_configs.VoiceChatConfigs.from_file",
Expand Down

0 comments on commit f54024a

Please sign in to comment.