Fix GET request in service and manager test suites

Change-Id: I9fad76d30bb3a9f5791fffbc70b59e50f86ba843
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index 6f1bfa3..42c1edc 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -30,13 +30,13 @@
     redfish.Login
     ${resp}=  redfish.Get  /redfish/v1/SessionService
     Should Be Equal As Strings  ${resp.status}  ${HTTP_OK}
+    redfish.Logout
 
 
 GET SessionService Without Login
     [Documentation]  Get /redfish/v1/SessionService without login
     [Tags]  GET_SessionService_Without_Login
 
-    redfish.Logout
     ${resp}=  redfish.Get  /redfish/v1/SessionService
     Should Be Equal As Strings  ${resp.status}  ${HTTP_UNAUTHORIZED}
 
@@ -45,8 +45,6 @@
     [Documentation]  Login to BMCweb with invalid token.
     [Tags]  Login_Using_Invalid_Token
 
-    redfish.Logout
-
     Create Session  openbmc  ${AUTH_URI}
 
     # Example: "X-Auth-Token: 3la1JUf1vY4yN2dNOwun"
@@ -68,12 +66,12 @@
     # Example o/p:
     # [{'@odata.id': '/redfish/v1/SessionService/Sessions/bOol3WlCI8'},
     #  {'@odata.id': '/redfish/v1/SessionService/Sessions/Yu3xFqjZr1'}]
-    ${resp_list}=  redfish.Get  /redfish/v1/SessionService/Sessions
+    ${resp_list}=  redfish.List Request  SessionService/Sessions
 
-    redfish.Delete  ${resp_list.dict["Members"][0]["@odata.id"]}
+    redfish.Delete  ${resp_list[1]}
 
-    ${resp}=  redfish.Get  /redfish/v1/SessionService/Sessions
-    Should Not Contain  ${resp.dict["Members"]}  ${resp_list.dict["Members"][0]["@odata.id"]}
+    ${resp}=  redfish.List Request  SessionService/Sessions
+    List Should Not Contain Value  ${resp}  ${resp_list[1]}
     redfish.Logout