def test3_register_hub_site(self):
     client_admin = ClientContext(test_admin_site_url).with_credentials(
         test_user_credentials)
     tenant = Tenant(client_admin)
     props = tenant.register_hub_site(
         self.__class__.site_response.SiteUrl).execute_query()
     self.assertIsNotNone(props)
Exemple #2
0
    def test4_register_hub_site(self):
        client_admin = ClientContext(test_admin_site_url).with_credentials(
            test_user_credentials)
        tenant = Tenant(client_admin)
        props = tenant.register_hub_site(
            self.__class__.site_response.SiteUrl).execute_query()
        self.assertIsNotNone(props.site_id)

        target_site = Site.from_url(
            self.__class__.site_response.SiteUrl).with_credentials(
                test_user_credentials)
        target_site.get().execute_query()
        self.assertTrue(target_site.is_hub_site)