示例#1
0
    def test_save_user(self):
        user = User("foo-user", "password")

        assert user.create(self.connection).description() is None
        user.set_description("This is the foo user")

        user.update(self.connection)

        user = User.lookup(self.connection, "foo-user")
        assert "This is the foo user" == user.description()

        user.delete(self.connection)
示例#2
0
    def test_save_user(self):
        connection = Connection.make_connection(tc.hostname, tc.admin, tc.password)
        user = User("foo-user", "password")

        self.assertIsNone(user.create(connection).description())
        user.set_description("This is the foo user")

        user.update(connection)

        user = User.lookup(connection, "foo-user")
        self.assertEqual("This is the foo user", user.description())

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

        self.assertIsNone(user.create(connection).description())
        user.set_description("This is the foo user")

        user.update(connection)

        user = User.lookup(connection, "foo-user")
        self.assertEqual("This is the foo user", user.description())

        user.delete(connection)
示例#4
0
    def test_description(self):
        user = User("foo-user")
        user.set_description("This is the foo user")

        assert "This is the foo user" == user.description()
    def test_description(self):
        user = User("foo-user")
        user.set_description("This is the foo user")

        self.assertEqual(user.description(), "This is the foo user")
示例#6
0
    def test_description(self):
        user = User("foo-user")
        user.set_description("This is the foo user")

        self.assertEqual(user.description(), "This is the foo user")