def create_resolvers_and_realm(self, resolver_data):
        """Test the connection with the corresponding button in the UI.
        Return the number of found users.
        """
        driver = self.driver
        created_resolvers = []
        total_expected_users = 0

        realmMgr = RealmManager(self)
        realmMgr.clear_realms()

        m = UserIdResolverManager(self)
        m.clear_resolvers()

        for d in resolver_data:
            expected_users = d['expected_users']
            m.open()
            r = m.create_resolver(d)
            m.test_connection(d['name'], expected_users)
            created_resolvers.append(r)
            total_expected_users += expected_users

        realm_name = "SE_realm1"
        realmMgr.create(realm_name, created_resolvers)

        user_view = UserView(driver, self.base_url, realm_name)
        self.assertEqual(total_expected_users, user_view.get_num_users(),
                         "Not the expected number of users")
예제 #2
0
    def create_resolvers_and_realm(self, resolver_data):
        """Test the connection with the corresponding button in the UI.
        Return the number of found users.
        """
        driver = self.driver
        created_resolvers = []
        total_expected_users = 0

        realmMgr = RealmManager(self)
        realmMgr.clear_realms()

        m = UserIdResolverManager(self)
        m.clear_resolvers()

        for d in resolver_data:
            expected_users = d['expected_users']
            m.open()
            r = m.create_resolver(d)
            m.test_connection(d['name'], expected_users)
            created_resolvers.append(r)
            total_expected_users += expected_users

        realm_name = "SE_realm1"
        realmMgr.create(realm_name, created_resolvers)

        user_view = UserView(driver, self.base_url, realm_name)
        self.assertEqual(total_expected_users, user_view.get_num_users(),
                         "Not the expected number of users")
예제 #3
0
 def clear_realms(self):
     # Need to clear realms so that useridresolvers can be deleted
     realmMgr = RealmManager(self)
     realmMgr.clear_realms()
 def clear_realms(self):
     # Need to clear realms so that useridresolvers can be deleted
     realmMgr = RealmManager(self)
     realmMgr.clear_realms()
예제 #5
0
    def test_clear_realms(self):
        r = RealmManager(self)
        r.clear_realms()
        r.close()

        m = UserIdResolverManager(self)
        m.clear_resolvers()

        resolver_data = data.musicians_ldap_resolver
        m.create_resolver(resolver_data)
        
        r.create("test_clear_realm", resolver_data['name'])
        
        realms =  r.get_realms_list()
        self.assertEqual(len(realms), 1, "Realm count should be 1")
        
        r.clear_realms()

        realms =  r.get_realms_list()
        self.assertEqual(len(realms), 0, "Realm count should be 0")

        
예제 #6
0
 def test_realm_open(self):            
     r = RealmManager(self)
     r.open()
예제 #7
0
    def test_clear_realms(self):
        r = RealmManager(self)
        r.clear_realms()
        r.close()

        m = UserIdResolverManager(self)
        m.clear_resolvers()

        resolver_data = data.musicians_ldap_resolver
        m.create_resolver(resolver_data)
        
        r.create("test_clear_realm", resolver_data['name'])
        
        realms =  r.get_realms_list()
        self.assertEqual(len(realms), 1, "Realm count should be 1")
        
        r.clear_realms()

        realms =  r.get_realms_list()
        self.assertEqual(len(realms), 0, "Realm count should be 0")

        
예제 #8
0
 def test_realm_open(self):            
     r = RealmManager(self)
     r.open()