diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gd_diff.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py index 1b54f32..e59db1a 100644 --- a/tests/test_gd_diff.py +++ b/tests/test_gd_diff.py @@ -246,6 +246,30 @@ class TestGdDiff(object): 'gns-deb-diff', 'config')) + def test_configured_p_no(self): + def env(e): + return self.test_home + + with mock.patch('os.getenv', new=env): + configured = configured_p() + assert_equal(configured, False) + + + def test_configured_p_yes(self): + def env(e): + return self.test_home + + with mock.patch('os.getenv', new=env): + c_path = config_dir() + c_file = config_file() + + os.makedirs(c_path) + open(c_file, 'w').close() + + configured = configured_p() + assert_equal(configured, True) + + def teardown(self): """Teardown method for this class.""" if(path.exists(self.gns_pkgs_dir)): |