1
0
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:
Priit Laes 2015-09-14 11:15:35 +03:00
parent b87184bcea
commit 5dc9ce46a2

View File

@ -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