Skip to content

Commit

Permalink
Fixes example page test.
Browse files Browse the repository at this point in the history
Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>
  • Loading branch information
mkouhei committed Aug 21, 2015
1 parent e0d2642 commit a128a2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pgraph/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def test_config(self):
data = fobj.read()
self.assertEqual(data.encode('utf-8'), res.body)

def test_example(self):
@patch('pgraph.tasks.latest_version')
def test_example(self, _mock):
"""unit test of example redirect."""
_mock.return_value = 'Graph &quot;pgraph&quot;'
res = self.testapp.get('/graph/pgraph', status=200)
self.assertIn(b'Graph of &quot;pgraph&quot;', res.body)

0 comments on commit a128a2f

Please sign in to comment.