use called is True instead of called == 1
parent
ed2a892187
commit
28527c6fee
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue