From 1a44cd513cee7a41b8cea83ffc04549660e20724 Mon Sep 17 00:00:00 2001
From: ulif <uli@gnufix.de>
Date: Wed, 11 Nov 2015 08:23:34 +0100
Subject: [PATCH] Use new home_dir fixture.

---
 tests/test_config.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/test_config.py b/tests/test_config.py
index 0034c54..95150cf 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -10,13 +10,10 @@ class TestConfigModule(object):
         # there is a set of defaults for options available
         assert OPTIONS_DEFAULTS is not None
 
-    def test_valid_locations(self, tmpdir, monkeypatch):
+    def test_valid_locations(self, home_dir):
         # we look for config files in user home and local dir
-        new_home = tmpdir / "home"
-        new_home.ensure_dir()
-        monkeypatch.setenv("HOME", str(new_home))
         assert valid_locations() == [
-            str(new_home / ".diceware.ini")
+            str(home_dir / ".diceware.ini")
             ]
 
     def test_get_configparser(self, tmpdir):
@@ -31,10 +28,7 @@ class TestConfigModule(object):
         found, config = get_configparser([])
         assert found == []
 
-    def test_get_configparser_no_list(self, tmpdir, monkeypatch):
+    def test_get_configparser_no_list(self, home_dir):
         # we cope with no list at all
-        new_home = tmpdir / "home"
-        new_home.ensure_dir()
-        monkeypatch.setenv("HOME", str(new_home))
         found, config = get_configparser()
         assert found == []
-- 
GitLab