Ejemplo n.º 1
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)
Ejemplo n.º 2
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)