telepathy-gabble: stop using GetAvatarRequirements()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri Oct 11 14:58:34 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: 2d8b2b22c112d65b82f9b7302e6fa13c8e6541eb
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=2d8b2b22c112d65b82f9b7302e6fa13c8e6541eb

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Wed Oct  9 18:05:52 2013 -0400

stop using GetAvatarRequirements()

---

 tests/twisted/avatar-requirements.py |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/tests/twisted/avatar-requirements.py b/tests/twisted/avatar-requirements.py
index 09ebaca..25301b9 100644
--- a/tests/twisted/avatar-requirements.py
+++ b/tests/twisted/avatar-requirements.py
@@ -1,4 +1,5 @@
 from gabbletest import exec_test
+from servicetest import assertEquals
 import constants as cs
 
 def test_get_all(conn):
@@ -34,15 +35,13 @@ def test(q, bus, conn, stream):
     test_get_all(conn)
 
     # deprecated version
-    types, minw, minh, maxw, maxh, maxb = conn.Avatars.GetAvatarRequirements()
-    assert types[0] == 'image/png', types
-    assert 'image/jpeg' in types, types
-    assert 'image/gif' in types, types
-    assert minw == 32, minw
-    assert minh == 32, minh
-    assert maxw == 96, maxw
-    assert maxh == 96, maxh
-    assert maxb == 8192, maxb
+    props = conn.Properties.GetAll(cs.CONN_IFACE_AVATARS)
+    assertEquals(['image/png', 'image/jpeg', 'image/gif'], props['SupportedAvatarMIMETypes'])
+    assertEquals(32, props['MinimumAvatarWidth'])
+    assertEquals(32, props['MinimumAvatarHeight'])
+    assertEquals(96, props['MaximumAvatarWidth'])
+    assertEquals(96, props['MaximumAvatarHeight'])
+    assertEquals(8192, props['MaximumAvatarBytes'])
 
 if __name__ == '__main__':
     exec_test(test, do_connect=False)



More information about the telepathy-commits mailing list