summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2016-11-13 03:21:53 +0000
committerrsiddharth <s@ricketyspace.net>2016-11-13 03:21:53 +0000
commit92b8a39ca5d48dad73c646439529e9f84a76fc78 (patch)
tree5c3774c3de83bf80eb8f200282c2ac8e711ecc8b /tests
parent2bc1c934c0e2c00757f5cce09074d5fcca3a64d0 (diff)
Add `write_wiki_page` function.
* gd_diff.py (write_wiki_page): New function. * tests/test_gd_diff.py (test_write_wiki_page): Test for `write_wiki_page`.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gd_diff.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py
index 516fa35..cc7fc4a 100644
--- a/tests/test_gd_diff.py
+++ b/tests/test_gd_diff.py
@@ -293,6 +293,17 @@ class TestGdDiff(object):
assert_equal(os.path.isdir(wd_parkes), True)
+ def test_write_wiki_page(self):
+ def env(e):
+ return self.test_home
+
+ with mock.patch('os.getenv', new=env):
+ release = 'parkes'
+ write_wiki_page(release, 'wiki content')
+ wp_file = os.path.join(wiki_page_dir(release), 'last.rev')
+ assert_equal(read_file(wp_file), 'wiki content')
+
+
def test_configured_p_no(self):
def env(e):
return self.test_home