From e56d6a087a4a5a1a467d484477b1ebea16e30dd1 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Fri, 13 Sep 2013 16:12:26 +0200 Subject: [PATCH] fix unittests with mocking --- specs/test_comment.py | 5 ++++- specs/test_vote.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/specs/test_comment.py b/specs/test_comment.py index 694a419..da0a217 100644 --- a/specs/test_comment.py +++ b/specs/test_comment.py @@ -10,9 +10,12 @@ import unittest from werkzeug.test import Client from werkzeug.wrappers import Response -from isso import Isso, notify +from isso import Isso, notify, utils from isso.models import Comment +utils.heading = lambda *args: "Untitled." +utils.urlexists = lambda *args: True + class FakeIP(object): diff --git a/specs/test_vote.py b/specs/test_vote.py index ea8b2bd..478f33f 100644 --- a/specs/test_vote.py +++ b/specs/test_vote.py @@ -9,7 +9,10 @@ import unittest from werkzeug.test import Client from werkzeug.wrappers import Response -from isso import Isso, notify +from isso import Isso, notify, utils + +utils.heading = lambda *args: "Untitled." +utils.urlexists = lambda *args: True class FakeIP(object):