def services_list_test():
    global failed
    global passed
    api = API("nbsmobile")
    resp = json.loads(api.servicesList())
    if resp["1"]["name"] == "MYSPACE" and resp["36"]["name"] == "PANDORA":
        passed += 1
    else:
        failed += ["artist_add_test( )"]
def services_list_test():
  global failed
  global passed
  api = API("nbsmobile", "", ".xml")
  resp = xml.dom.minidom.parseString(api.servicesList())
  elements = resp.getElementsByTagName("name")
  names = []
  for i in elements:
    names.append(i.childNodes[0].data)
  if(names[0] == "MYSPACE" and names[12] == "PANDORA"):
    passed += 1
  else:
    failed.append("services_list_test( )")