import argparse
import pytest
+import os
from ceph_volume import exceptions
from ceph_volume.util import arg_validators
def setup(self):
self.validator = arg_validators.OSDPath()
- def test_is_not_root(self):
+ def test_is_not_root(self, monkeypatch):
+ monkeypatch.setattr(os, 'getuid', lambda: 100)
with pytest.raises(exceptions.SuperUserError):
self.validator('')