Exemplo n.º 1
0
    def test_list(self):
        connection = Connection.make_connection(tc.hostname, tc.admin, tc.password)

        users = User.list(connection)

        self.assertGreater(len(users), 2)
        self.assertIn("nobody", users)
Exemplo n.º 2
0
    def users(self, connection=None):
        """
        Get a list of the users in the local cluster.
        """
        if connection is None:
            connection = self.connection

        return User.list(connection)
    def test_list(self):
        connection = Connection.make_connection(tc.hostname, tc.admin,
                                                tc.password)

        users = User.list(connection)

        self.assertGreater(len(users), 2)
        self.assertIn("nobody", users)
Exemplo n.º 4
0
    def users(self, connection=None):
        """
        Get a list of the users in the local cluster.
        """
        if connection is None:
            connection = self.connection

        return User.list(connection)
Exemplo n.º 5
0
    def test_create_user(self):
        new_user = User("foo-user", "password")

        assert "foo-user" == new_user.user_name()

        new_user.create(self.connection)

        users = User.list(self.connection)

        assert "foo-user" in users
        new_user.delete(self.connection)
Exemplo n.º 6
0
    def test_create_user(self):
        connection = Connection.make_connection(tc.hostname, tc.admin, tc.password)
        new_user = User("foo-user", "password")

        self.assertEqual(new_user.user_name(), "foo-user")

        new_user.create(connection)

        users = User.list(connection)

        self.assertIn("foo-user", users)
        new_user.delete(connection)
    def test_create_user(self):
        connection = Connection.make_connection(tc.hostname, tc.admin,
                                                tc.password)
        new_user = User("foo-user", "password")

        self.assertEqual(new_user.user_name(), "foo-user")

        new_user.create(connection)

        users = User.list(connection)

        self.assertIn("foo-user", users)
        new_user.delete(connection)
 def list(self, args, config, connection):
     names = User.list(connection)
     print(json.dumps(names, sort_keys=True, indent=2))
Exemplo n.º 9
0
    def test_list(self):
        users = User.list(self.connection)

        assert len(users) > 2
        assert "nobody" in users
    def users(self, connection=None):
        if connection is None:
            connection = self.connection

        return User.list(connection)
Exemplo n.º 11
0
    def users(self, connection=None):
        if connection is None:
            connection = self.connection

        return User.list(connection)
Exemplo n.º 12
0
 def list(self, args, config, connection):
     names = User.list(connection)
     print(json.dumps(names,sort_keys=True, indent=2))