def test_GenerateXMLOneHrefOnly(self):

        server = Session("www.example.com")
        request = Multiget(server, "/", ("/a",))
        os = StringIO()
        request.generateXML(os)
        self.assertEqual(os.getvalue(), """<?xml version='1.0' encoding='utf-8'?>
<ns0:calendar-multiget xmlns:ns0="urn:ietf:params:xml:ns:caldav">
  <ns1:href xmlns:ns1="DAV:">/a</ns1:href>
</ns0:calendar-multiget>
""".replace("\n", "\r\n")
)
    def test_GenerateXMLOneHrefOnly(self):

        server = Session("www.example.com")
        request = Multiget(server, "/", ("/a",))
        os = StringIO()
        request.generateXML(os)
        self.assertEqual(
            os.getvalue(), """<?xml version='1.0' encoding='utf-8'?>
<ns0:calendar-multiget xmlns:ns0="urn:ietf:params:xml:ns:caldav">
  <ns1:href xmlns:ns1="DAV:">/a</ns1:href>
</ns0:calendar-multiget>
""".replace("\n", "\r\n")
        )
    def test_GenerateXMLMultipleHrefsMultipleProperties(self):

        server = Session("www.example.com")
        request = Multiget(server, "/", ("/a", "/b",), (davxml.getetag, davxml.displayname,))
        os = StringIO()
        request.generateXML(os)
        self.assertEqual(os.getvalue(), """<?xml version='1.0' encoding='utf-8'?>
<ns0:calendar-multiget xmlns:ns0="urn:ietf:params:xml:ns:caldav">
  <ns1:prop xmlns:ns1="DAV:">
    <ns1:getetag />
    <ns1:displayname />
  </ns1:prop>
  <ns1:href xmlns:ns1="DAV:">/a</ns1:href>
  <ns1:href xmlns:ns1="DAV:">/b</ns1:href>
</ns0:calendar-multiget>
""".replace("\n", "\r\n")
)
    def test_GenerateXMLMultipleHrefsMultipleProperties(self):

        server = Session("www.example.com")
        request = Multiget(server, "/", ("/a", "/b",), (davxml.getetag, davxml.displayname,))
        os = StringIO()
        request.generateXML(os)
        self.assertEqual(
            os.getvalue(), """<?xml version='1.0' encoding='utf-8'?>
<ns0:calendar-multiget xmlns:ns0="urn:ietf:params:xml:ns:caldav">
  <ns1:prop xmlns:ns1="DAV:">
    <ns1:getetag />
    <ns1:displayname />
  </ns1:prop>
  <ns1:href xmlns:ns1="DAV:">/a</ns1:href>
  <ns1:href xmlns:ns1="DAV:">/b</ns1:href>
</ns0:calendar-multiget>
""".replace("\n", "\r\n")
        )