Browse Source

lets try moving env setup to fixtures

master
heck 5 years ago
parent
commit
f07f6e060c
  1. 2
      tests/conftest.py
  2. 2
      tests/test_identity.py

2
tests/conftest.py

@ -33,6 +33,8 @@ def tmpdir(tmpdir_factory, request):
"""Create a tmp dir for the tests"""
base = str(hash(request.node.nodeid))[:3]
bn = tmpdir_factory.mktemp(base)
import os
os.environ["HOME"] = str(bn)
return bn

2
tests/test_identity.py

@ -5,8 +5,6 @@ from . import constants
def test_create_one_identity_succeed(tmpdir):
# Change $HOME before initializing the db
os.environ["HOME"] = str(tmpdir)
# It has to be imported here to get the management db initialized,
import pEp
alice = pEp.Identity()

Loading…
Cancel
Save