Skip to content

Commit

Permalink
fix unittests for ovos-utils==0.0.36a9 (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Oct 19, 2023
1 parent 46b6650 commit fec0f70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ padacioso~=0.2, >=0.2.1a8
adapt-parser>=1.0.0, <2.0.0

ovos-bus-client<0.1.0, >=0.0.6a10
ovos-utils<0.1.0, ==0.0.36a8
ovos-utils==0.0.36a9
ovos-plugin-manager<0.1.0, >=0.0.24a9
ovos-config~=0.0,>=0.0.11a13
ovos-lingua-franca>=0.4.7
Expand Down
7 changes: 5 additions & 2 deletions test/unittests/common_query/test_common_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def test_common_query_events(self):
# thinking animation
{'type': 'enclosure.mouth.think',
'data': {},
'context': {'destination': "skills", 'source': 'audio',
'skill_id': self.cc.skill_id}},
'context': qq_ctxt},
# send query
{'type': 'question:query',
'data': {'phrase': 'what is the speed of light'},
Expand Down Expand Up @@ -99,4 +98,8 @@ def test_common_query_events(self):

for ctr, msg in enumerate(expected):
m = self.bus.emitted_msgs[ctr]
if "session" in m.get("context", {}):
m["context"].pop("session") # simplify test comparisons
if "session" in msg.get("context", {}):
msg["context"].pop("session") # simplify test comparisons
self.assertEqual(msg, m)
5 changes: 4 additions & 1 deletion test/unittests/common_query/test_continuous_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def setUp(self):
self.bus.emitted_msgs = []

def get_msg(msg):
self.bus.emitted_msgs.append(json.loads(msg))
m = json.loads(msg)
if "session" in m.get("context", {}):
m["context"].pop("session") # simplify tests
self.bus.emitted_msgs.append(m)

self.bus.on("message", get_msg)

Expand Down

0 comments on commit fec0f70

Please sign in to comment.