use called is True instead of called == 1

master
mutantmonkey 2012-06-02 03:07:22 -07:00
parent ed2a892187
commit 28527c6fee
3 changed files with 13 additions and 12 deletions

View File

@ -14,4 +14,4 @@ class TestCommit(unittest.TestCase):
def test_commit(self):
commit(self.phenny, None)
assert self.phenny.reply.called == 1
assert self.phenny.reply.called is True

View File

@ -14,25 +14,25 @@ class TestMylife(unittest.TestCase):
def test_fml(self):
mylife.fml(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_mlia(self):
mylife.mlia(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_mlib(self):
mylife.mlib(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_mlih(self):
mylife.mlih(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_mlihp(self):
mylife.mlihp(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_mlit(self):
mylife.mlit(self.phenny, None)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True

View File

@ -47,7 +47,7 @@ class TestSearch(unittest.TestCase):
input = Mock(group=lambda x: 'vtluug virginia phenny')
gcs(self.phenny, input)
assert self.phenny.say.called == 1
assert self.phenny.say.called is True
def test_bing_search(self):
out = bing_search('phenny')
@ -59,7 +59,7 @@ class TestSearch(unittest.TestCase):
input = Mock(group=lambda x: 'swhack')
bing(self.phenny, input)
assert self.phenny.reply.called == 1
assert self.phenny.reply.called is True
def test_duck_search(self):
out = duck_search('phenny')
@ -71,16 +71,17 @@ class TestSearch(unittest.TestCase):
input = Mock(group=lambda x: 'swhack')
duck(self.phenny, input)
assert self.phenny.reply.called == 1
assert self.phenny.reply.called is True
def test_search(self):
input = Mock(group=lambda x: 'vtluug')
duck(self.phenny, input)
assert self.phenny.reply.called == 1
assert self.phenny.reply.called is True
def test_suggest(self):
input = Mock(group=lambda x: 'vtluug')
suggest(self.phenny, input)
assert (self.phenny.reply.called == 1 or self.phenny.say.called == 1)
assert (self.phenny.reply.called is True or \
self.phenny.say.called is True)