mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 16:25:17 +00:00
Skip tests requiring certidude user
This commit is contained in:
parent
b87184bcea
commit
5dc9ce46a2
@ -1,9 +1,20 @@
|
||||
import os
|
||||
import pwd
|
||||
import pytest
|
||||
from click.testing import CliRunner
|
||||
from certidude.cli import entry_point as cli
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
def user_check(name='certidude'):
|
||||
try:
|
||||
pwd.getpwnam(name)
|
||||
return False
|
||||
except KeyError:
|
||||
pass
|
||||
return True
|
||||
|
||||
@pytest.mark.skipif(user_check(), reason="Missing certidude user")
|
||||
def test_cli():
|
||||
|
||||
# Authority setup
|
||||
|
Loading…
Reference in New Issue
Block a user