Convert the test from `unittest` to `pytest`. No semantic change.
Use the `can_modify_immutable()` helper from the TestBase parent class so we do not duplicate the code in multiple places. Similarly, make use of the `have_rpm_ostree()` helper.
Move the util-linux tests to the module-level tests and align its implementation.