[telepathy-mission-control/master] Tighten assertions about user action times in tests

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 20 14:49:38 PDT 2009


---
 .../dispatcher/dispatch-delayed-by-plugin.py       |    2 +-
 test/twisted/dispatcher/ensure-is-approval.py      |    2 +-
 test/twisted/dispatcher/ensure-rapidly.py          |    4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/twisted/dispatcher/dispatch-delayed-by-plugin.py b/test/twisted/dispatcher/dispatch-delayed-by-plugin.py
index 3568234..0279feb 100644
--- a/test/twisted/dispatcher/dispatch-delayed-by-plugin.py
+++ b/test/twisted/dispatcher/dispatch-delayed-by-plugin.py
@@ -253,7 +253,7 @@ def test(q, bus, mc):
     assert channels[0][0] == chan.object_path, channels
     assert channels[0][1] == chan.immutable, channels
     assert e.args[3] == [request_path], e.args
-    # FIXME: untrue: assert e.args[4] == user_action_time
+    assert e.args[4] == user_action_time, (e.args[4], user_action_time)
     assert isinstance(e.args[5], dict)
     assert len(e.args) == 6
 
diff --git a/test/twisted/dispatcher/ensure-is-approval.py b/test/twisted/dispatcher/ensure-is-approval.py
index de21ea6..8426d35 100644
--- a/test/twisted/dispatcher/ensure-is-approval.py
+++ b/test/twisted/dispatcher/ensure-is-approval.py
@@ -238,7 +238,7 @@ def test(q, bus, mc):
     assert channels[0][0] == chan.object_path, channels
     assert channels[0][1] == chan.immutable, channels
     assert e.args[3] == [request_path], e.args
-    # FIXME: untrue: assert e.args[4] == user_action_time
+    assert e.args[4] == user_action_time, (e.args[4], user_action_time)
     assert isinstance(e.args[5], dict)
     assert len(e.args) == 6
 
diff --git a/test/twisted/dispatcher/ensure-rapidly.py b/test/twisted/dispatcher/ensure-rapidly.py
index 9fcb35f..e2e56d4 100644
--- a/test/twisted/dispatcher/ensure-rapidly.py
+++ b/test/twisted/dispatcher/ensure-rapidly.py
@@ -191,9 +191,7 @@ def test_channel_creation(q, bus, account, client, conn):
     assert channels[0][1] == channel_immutable, channels
     assert sorted(e.args[3]) == sorted([cr1.object_path,
         cr2.object_path]), e.args
-    # FIXME: we ought to define which of these it should be, probably the
-    # larger (because that was the last relevant user input)
-    assert e.args[4] in [user_action_time1, user_action_time2]
+    assert e.args[4] == user_action_time2, (e.args[4], user_action_time2)
     assert isinstance(e.args[5], dict)
     assert len(e.args) == 6
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list