def test_resourcetype_is_collection(self, browser):
     req_body = propfind.make_propfind_request_body({
             'DAV:': ['resourcetype']})
     browser.login().webdav('PROPFIND', data=req_body)
     self.assertEquals('HTTP/1.1 200 OK',
                       propfind.status_for_property('resourcetype'))
     self.assertEquals(['collection'],
                       propfind.property_type('resourcetype'))
    def test_resourcetype(self, browser):
        # http://tools.ietf.org/html/rfc3744#section-4
        # "PROPFIND" on the principal view must return a DAV:resourcetype
        # of "DAV:principal".

        req_body = propfind.make_propfind_request_body({
                'DAV:': ['resourcetype']})
        browser.login().webdav('PROPFIND', view='caldav-principal/test_user_1_',
                               data=req_body)
        self.assertEquals('HTTP/1.1 200 OK',
                          propfind.status_for_property('resourcetype'))
        self.assertEquals(['principal'],
                          propfind.property_type('resourcetype'))