Exemple #1
0
    def test_update_application_to_be_single_tenant(self):
        graph_app_client = mock.MagicMock()
        app_mock = mock.MagicMock()
        test_object_id = '11111111-2222-3333-4444-555555555555'
        app_mock.object_id = test_object_id
        graph_app_client.list.return_value = [app_mock]

        update_application(graph_app_client, 'http://any-client', available_to_other_tenants=True)
        graph_app_client.patch.assert_called_with(test_object_id,
                                                  ApplicationUpdateParameters(available_to_other_tenants=True))
Exemple #2
0
 def test_update_application_to_be_single_tenant(self):
     test_app_id = 'app_id_123'
     app = Application(app_id=test_app_id)
     setattr(app, 'additional_properties', {})
     instance = update_application(app, 'http://any-client',
                                   available_to_other_tenants=True)
     self.assertTrue(isinstance(instance, ApplicationUpdateParameters))
     self.assertEqual(instance.available_to_other_tenants, True)
 def test_update_application_to_be_single_tenant(self):
     test_app_id = 'app_id_123'
     app = Application(app_id=test_app_id)
     setattr(app, 'additional_properties', {})
     instance = update_application(app, 'http://any-client',
                                   available_to_other_tenants=True)
     self.assertTrue(isinstance(instance, ApplicationUpdateParameters))
     self.assertEqual(instance.available_to_other_tenants, True)
 def test_update_application_to_be_single_tenant(self):
     instance = update_application(None, 'http://any-client', available_to_other_tenants=True)
     self.assertTrue(isinstance(instance, ApplicationUpdateParameters))
     self.assertEqual(instance.available_to_other_tenants, True)
 def test_update_application_to_be_single_tenant(self):
     instance = update_application(None,
                                   'http://any-client',
                                   available_to_other_tenants=True)
     self.assertTrue(isinstance(instance, ApplicationUpdateParameters))
     self.assertEqual(instance.available_to_other_tenants, True)