diff options
author | rsiddharth <s@ricketyspace.net> | 2017-01-06 01:09:06 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2017-01-06 01:09:06 +0000 |
commit | e46931f435cf00f1d70a6a6ccb755b92b7eff441 (patch) | |
tree | 872f84f81748b8ba42d91aa266245830a5b5d0cf /tests/test_gd_diff.py | |
parent | f61cc88f69509c0d448d4c45960fb17d137b21e1 (diff) |
Add `wiki_page_path` function.
* gd_diff.py (wiki_page_path): New function.
(write_wiki_page): Update function; use `wiki_page_path` function.
* tests/test_gd_diff.py (TestGdDiff.test_wiki_page_path): Test for
`wiki_page_path`.
(test_write_wiki_page): Update test.
Diffstat (limited to 'tests/test_gd_diff.py')
-rw-r--r-- | tests/test_gd_diff.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py index 86b6659..22f8a48 100644 --- a/tests/test_gd_diff.py +++ b/tests/test_gd_diff.py @@ -179,11 +179,19 @@ class TestGdDiff(object): assert_equal(os.path.isdir(wd_parkes), True) + def test_wiki_page_path(self): + with mock.patch('os.getenv', new=self.env_func): + assert_equal(wiki_page_path('parkes'), + path.join(os.getenv('HOME'), '.config', + 'gns-deb-diff', 'wiki-page', + 'parkes', 'wiki.page')) + + def test_write_wiki_page(self): with mock.patch('os.getenv', new=self.env_func): release = 'parkes' write_wiki_page(release, 'wiki content') - wp_file = os.path.join(wiki_page_dir(release), 'last.rev') + wp_file = os.path.join(wiki_page_dir(release), 'wiki.page') assert_equal(read_file(wp_file), 'wiki content') |