Browse Source

lets try moving env setup to fixtures

PYADPT-100
heck 2 years ago
parent
commit
f07f6e060c
2 changed files with 2 additions and 2 deletions
  1. +2
    -0
      tests/conftest.py
  2. +0
    -2
      tests/test_identity.py

+ 2
- 0
tests/conftest.py View File

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


+ 0
- 2
tests/test_identity.py View File

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