[libdmapsharing] Make use of dmap_connection_authenticate_message from tests



commit b8f2f8eb10518ade4dcff0e873684baa351c6109
Author: W. Michael Petullo <mike flyn org>
Date:   Sun Mar 25 15:43:57 2018 -0400

    Make use of dmap_connection_authenticate_message from tests
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 tests/test-dmap-client-python |    4 +---
 tests/test-dmap-client.c      |    5 ++---
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-dmap-client-python b/tests/test-dmap-client-python
index a829f2a..759022c 100755
--- a/tests/test-dmap-client-python
+++ b/tests/test-dmap-client-python
@@ -51,9 +51,7 @@ class TestDmapClient(GObject.GObject):
         username = connection.get_property('username')
         print('Require password for %s@%s: ' % (username, name), end='', file=sys.stderr)
         password = input()
-        connection.set_property('password', password)
-        auth.authenticate(username, password)
-        session.unpause_message(msg)
+        connection.authenticate_message(connection, session, msg, auth, password)
 
     def connected_cb(self, connection, result, reason, user_data):
         self.db.foreach(self.print_record, None)
diff --git a/tests/test-dmap-client.c b/tests/test-dmap-client.c
index b97f878..3130159 100644
--- a/tests/test-dmap-client.c
+++ b/tests/test-dmap-client.c
@@ -94,9 +94,8 @@ authenticate_cb (DmapConnection *connection,
        g_print ("Password required (username is %s): ", username);
        fgets (password, BUFSIZ, stdin);
        password[strlen(password) - 1] = 0x00; // Remove newline.
-       g_object_set (connection, "password", password, NULL);
-       soup_auth_authenticate (auth, username, password);
-       soup_session_unpause_message (session, msg);
+
+       dmap_connection_authenticate_message(connection, session, msg, auth, password);
 
        g_free(username);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]